@yext/visual-editor 0.0.20 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,297 +0,0 @@
1
- "use strict";var V1=Object.defineProperty;var K1=(e,t,n)=>t in e?V1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pl=(e,t,n)=>K1(e,typeof t!="symbol"?t+"":t,n);const H=require("react"),Fu=require("react-dom"),Vn=require("@measured/puck"),Rg=require("uuid");function iE(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=iE(H),aE=iE(Fu),lr=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],sE=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),Ho=(e,t)=>{const[n,r]=H.useState("pending");return lE(e,t,U1(r)),{sendToParent:i=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const a of t)sE({...i,type:e},window.parent,a)},status:n}},Pa=(e,t,n)=>{lE(e,t,(o,i,a)=>{const{type:l,payload:u}=o;l===e&&typeof n=="function"&&n(p=>sE({...p,type:e},a,i),u)})},lE=(e,t,n)=>{const[r,o]=H.useState(),[i,a]=H.useState(),l=H.useRef(),u=H.useRef();l.current=r,u.current=i;const p=H.useCallback(({origin:m,source:b,data:C})=>{var y;if((y=C==null?void 0:C.source)!=null&&y.startsWith("react-devtools")||!t.includes(m))return;const{type:_}=C;_===e&&(a(b),o(m),n(C,m,b))},[e,t,a,o,n]);H.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[e,i,r,p])},U1=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},Y1=()=>{const[e,t]=H.useState();return Pa("getEntityDocument",lr,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},q1=()=>{const[e,t]=H.useState(void 0);return Pa("getTemplateStream",lr,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),Pa("getDevEntityFields",lr,(n,r)=>{t(cE(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},cE=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children?{fields:cE(t.children)}:{}})),uE=ge.createContext(void 0),dE=()=>{const e=ge.useContext(uE);if(!e)throw new Error("useEntityFields must be used within VisualEditorProvider");return e},$g=ge.createContext(void 0),Pr=()=>{const e=ge.useContext($g);if(!e)throw new Error("useDocument must be used within VisualEditorProvider");return e},Dg=ge.createContext(void 0),fE=()=>{const e=ge.useContext(Dg);if(!e)throw new Error("useTailwindConfig must be used within VisualEditorProvider");return e},Z1=(e,t)=>{const n=J1(e);return t&&Object.entries(n).forEach(([r])=>{t[r]&&(n[r]=t[r])}),n},J1=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if("default"in i)t[`--${i.plugin}-${n}-${o}`]=typeof i.default=="number"?`${i.default}px`:i.default;else if("styles"in i)for(const a in i.styles)t[`--${i.plugin}-${n}-${o}-${a}`]=typeof i.styles[a].default=="number"?`${i.styles[a].default}px`:i.styles[a].default}}return t},X1=(e,t,n)=>{const r={};for(const o in n.styles){const i=n.styles[o];if("default"in i)i.type==="number"?r[`--${i.plugin}-${t}-${o}`]=e[o]+"px":r[`--${i.plugin}-${t}-${o}`]=e[o];else for(const a in i.styles)i.styles[a].type==="number"?r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]+"px":r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]}return r},vi=class vi{constructor(t=!1){pl(this,"enable",t=>{vi.enabled=t,vi.enabled&&console.log("[DEBUG] xYextDebug enabled")});pl(this,"logData",(t,n)=>{vi.enabled&&console.log("[DEBUG]",t,"-",n)});pl(this,"logFunc",t=>{vi.enabled&&console.log("[DEBUG] -->",t,"called")});pl(this,"log",t=>{vi.enabled&&console.log("[DEBUG]",t)});vi.enabled=t,vi.enabled&&console.log("[DEBUG] xYextDebug enabled")}};pl(vi,"enabled");let Ur=vi;const kg={Alegreya:{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Asap:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Bitter:{italics:!0,minWeight:100,maxWeight:900,fallback:"serif"},Cabin:{italics:!0,minWeight:400,maxWeight:700,fallback:"sans-serif"},Cinzel:{italics:!1,minWeight:400,maxWeight:900,fallback:"serif"},"EB Garamond":{italics:!0,minWeight:400,maxWeight:800,fallback:"serif"},"Exo 2":{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Inconsolata:{italics:!1,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Josefin Sans":{italics:!0,minWeight:100,maxWeight:700,fallback:"sans-serif"},Lora:{italics:!0,minWeight:400,maxWeight:700,fallback:"serif"},Montserrat:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Open Sans":{italics:!0,minWeight:300,maxWeight:800,fallback:"sans-serif"},"Playfair Display":{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Raleway:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Flex":{italics:!1,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Slab":{italics:!1,minWeight:100,maxWeight:900,fallback:"serif"},"Source Code Pro":{italics:!0,minWeight:200,maxWeight:900,fallback:"monospace"},"Source Sans 3":{italics:!0,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Ubuntu Sans":{italics:!0,minWeight:100,maxWeight:800,fallback:"sans-serif"}},Q1=e=>{const t=[];for(const n in e){const r=e[n];t.push({label:n,value:`'${n}', ${r.fallback}`})}return t},eO=e=>{const t=`<link rel="preconnect" href="https://fonts.googleapis.com">
2
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3
- <link href="https://fonts.googleapis.com/css2?`,n='display=swap" rel="stylesheet">';let r="";for(const o in e){const i=e[o],a=i.italics?":ital,wght@":":wght@",l=`${i.minWeight}..${i.maxWeight}`,u=i.italics?`0,${l};1,${l}`:l;r+="family="+o.replaceAll(" ","+")+a+u+"&"}return t+r+n},tO=eO(kg),Bp=[{label:"Thin",value:"100"},{label:"Extralight",value:"200"},{label:"Light",value:"300"},{label:"Normal",value:"400"},{label:"Medium",value:"500"},{label:"Semibold",value:"600"},{label:"Bold",value:"700"},{label:"Extrabold",value:"800"},{label:"Black",value:"900"}],nO=e=>{var i;const{fontCssVariable:t,weightOptions:n=Bp}=e;if(!t||typeof window>"u")return n;const r=document.getElementById(Pg),o=(i=r==null?void 0:r.contentDocument)==null?void 0:i.getElementById("visual-editor-theme");return o?hE(o,e):Bp},Ns=async e=>new Promise(t=>{const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(Pg).contentDocument)==null?void 0:i.getElementById(Mg);if(o){n.disconnect();const a=hE(o,e);t([{label:"Default",value:"default"},...a])}});n.observe(document,{childList:!0,subtree:!0})}),hE=(e,{fontCssVariable:t,weightOptions:n=Bp,fontList:r=kg})=>{var l;const o=e.textContent||e.innerHTML,i=new RegExp(`${t}:\\s*(['"]?([^',\\s]+(?:\\s+[^',\\s]+)*)['"]?)(?:,|\\s|;|$)`,"i"),a=(l=o.match(i))==null?void 0:l[2];return!a||!r[a]?n:n.filter(u=>Number(u.value)<=r[a].maxWeight&&Number(u.value)>=r[a].minWeight)},Mg="visual-editor-theme",Pg="preview-frame",uf=new Ur,rO=(e,t,n)=>{var i;uf.logFunc("applyTheme");const r=(i=e==null?void 0:e.__)==null?void 0:i.theme,o=r?JSON.parse(r):void 0;return Object.keys(t).length>0?`${n??""}${tO}<style id="${Mg}" type="text/css">${pE(o,t)}</style>`:n??""},pE=(e,t)=>{uf.logFunc("internalApplyTheme");const n=Z1(t,e);return!n||Object.keys(n).length===0?"":(uf.logData("THEME_VALUES_TO_APPLY",n),".components{"+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}")},Ru=async(e,t)=>{uf.logFunc("updateThemeInEditor");const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(Pg).contentDocument)==null?void 0:i.getElementById(Mg);o&&(n.disconnect(),o.innerText=pE(e,t))});n.observe(document,{childList:!0,subtree:!0})},On=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled||!t.field)return t.constantValue;try{const n=t.field.split(".");let r=!1,o=e;for(let i=0;i<n.length;i++)if((o==null?void 0:o[n[i]])!==void 0)o=o[n[i]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}},oO=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if(t[i.plugin]||(t[i.plugin]={}),"default"in i)t[i.plugin][`${n}-${o}`]=`var(--${i.plugin}-${n}-${o})`;else if("styles"in i){const a={};for(const l in i.styles)a[l]=`var(--${i.plugin}-${n}-${o}-${l})`;t[i.plugin][`${n}-${o}`]=a}}}return t},gE=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],i=n[r];Hy(o)&&Hy(i)?n[r]=gE(o,i):(o&&i&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${r}. Using the value from theme.config.ts (${i})`),n[r]=i??o)}return n},Hy=e=>e!==null&&typeof e=="object",iO=(e,t)=>{const n=oO(t);return gE(e,n)};function mE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=mE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yE(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mE(e))&&(r&&(r+=" "),r+=t);return r}const Ig="-",aO=e=>{const t=lO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(Ig);return l[0]===""&&l.length!==1&&l.shift(),vE(l,t)||sO(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},vE=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?vE(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ig);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},Gy=/^\[(.+)\]$/,sO=e=>{if(Gy.test(e)){const t=Gy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return uO(Object.entries(e.classGroups),n).forEach(([i,a])=>{Wp(a,r,i,t)}),r},Wp=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Vy(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(cO(o)){Wp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Wp(a,Vy(t,i),n,r)})})},Vy=(e,t)=>{let n=e;return t.split(Ig).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cO=e=>e.isThemeGetter,uO=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e,dO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},bE="!",fO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=l=>{const u=[];let p=0,m=0,b;for(let T=0;T<l.length;T++){let O=l[T];if(p===0){if(O===o&&(r||l.slice(T,T+i)===t)){u.push(l.slice(m,T)),m=T+i;continue}if(O==="/"){b=T;continue}}O==="["?p++:O==="]"&&p--}const C=u.length===0?l:l.substring(m),_=C.startsWith(bE),y=_?C.substring(1):C,v=b&&b>m?b-m:void 0;return{modifiers:u,hasImportantModifier:_,baseClassName:y,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},hO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},pO=e=>({cache:dO(e.cacheSize),parseClassName:fO(e),...aO(e)}),gO=/\s+/,mO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(gO);let l="";for(let u=a.length-1;u>=0;u-=1){const p=a[u],{modifiers:m,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:_}=n(p);let y=!!_,v=r(y?C.substring(0,_):C);if(!v){if(!y){l=p+(l.length>0?" "+l:l);continue}if(v=r(C),!v){l=p+(l.length>0?" "+l:l);continue}y=!1}const T=hO(m).join(":"),O=b?T+bE:T,R=O+v;if(i.includes(R))continue;i.push(R);const k=o(v,y);for(let P=0;P<k.length;++P){const M=k[P];i.push(O+M)}l=p+(l.length>0?" "+l:l)}return l};function yO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=_E(t))&&(r&&(r+=" "),r+=n);return r}const _E=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_E(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ky(e,...t){let n,r,o,i=a;function a(u){const p=t.reduce((m,b)=>b(m),e());return n=pO(p),r=n.cache.get,o=n.cache.set,i=l,l(u)}function l(u){const p=r(u);if(p)return p;const m=mO(u,n);return o(u,m),m}return function(){return i(yO.apply(null,arguments))}}const wn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xE=/^\[(?:([a-z-]+):)?(.+)\]$/i,vO=/^\d+\/\d+$/,bO=new Set(["px","full","screen"]),_O=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,EO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,CO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gi=e=>Wl(e)||bO.has(e)||vO.test(e),Sa=e=>ec(e,"length",DO),Wl=e=>!!e&&!Number.isNaN(Number(e)),Ph=e=>ec(e,"number",Wl),iu=e=>!!e&&Number.isInteger(Number(e)),TO=e=>e.endsWith("%")&&Wl(e.slice(0,-1)),qt=e=>xE.test(e),Oa=e=>_O.test(e),NO=new Set(["length","size","percentage"]),SO=e=>ec(e,NO,EE),OO=e=>ec(e,"position",EE),AO=new Set(["image","url"]),RO=e=>ec(e,AO,MO),$O=e=>ec(e,"",kO),au=()=>!0,ec=(e,t,n)=>{const r=xE.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},DO=e=>xO.test(e)&&!EO.test(e),EE=()=>!1,kO=e=>CO.test(e),MO=e=>wO.test(e),Uy=()=>{const e=wn("colors"),t=wn("spacing"),n=wn("blur"),r=wn("brightness"),o=wn("borderColor"),i=wn("borderRadius"),a=wn("borderSpacing"),l=wn("borderWidth"),u=wn("contrast"),p=wn("grayscale"),m=wn("hueRotate"),b=wn("invert"),C=wn("gap"),_=wn("gradientColorStops"),y=wn("gradientColorStopPositions"),v=wn("inset"),T=wn("margin"),O=wn("opacity"),R=wn("padding"),k=wn("saturate"),P=wn("scale"),M=wn("sepia"),Y=wn("skew"),X=wn("space"),oe=wn("translate"),Z=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",qt,t],de=()=>[qt,t],pe=()=>["",Gi,Sa],ne=()=>["auto",Wl,qt],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",qt],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Wl,qt];return{cacheSize:500,separator:":",theme:{colors:[au],spacing:[Gi,Sa],blur:["none","",Oa,qt],brightness:W(),borderColor:[e],borderRadius:["none","","full",Oa,qt],borderSpacing:de(),borderWidth:pe(),contrast:W(),grayscale:re(),hueRotate:W(),invert:re(),gap:de(),gradientColorStops:[e],gradientColorStopPositions:[TO,Sa],inset:Q(),margin:Q(),opacity:W(),padding:de(),saturate:W(),scale:W(),sepia:re(),skew:W(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[Oa]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),qt]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",iu,qt]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",iu,qt]}],"grid-cols":[{"grid-cols":[au]}],"col-start-end":[{col:["auto",{span:["full",iu,qt]},qt]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[au]}],"row-start-end":[{row:["auto",{span:[iu,qt]},qt]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[Oa]},Oa]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Oa,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ph]}],"font-family":[{font:[au]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",Wl,Ph]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gi,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gi,Sa]}],"underline-offset":[{"underline-offset":["auto",Gi,qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),OO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:U()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Gi,qt]}],"outline-w":[{outline:[Gi,Sa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[Gi,Sa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oa,$O]}],"shadow-color":[{shadow:[au]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Oa,qt]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[b]}],saturate:[{saturate:[k]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qt]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[iu,qt]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[Y]}],"skew-y":[{"skew-y":[Y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gi,Sa,Ph]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},PO=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:i={},override:a={}})=>{Eu(e,"cacheSize",t),Eu(e,"prefix",n),Eu(e,"separator",r),Eu(e,"experimentalParseClassName",o);for(const l in a)IO(e[l],a[l]);for(const l in i)LO(e[l],i[l]);return e},Eu=(e,t,n)=>{n!==void 0&&(e[t]=n)},IO=(e,t)=>{if(t)for(const n in t)Eu(e,n,t[n])},LO=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},CE=(e,...t)=>typeof e=="function"?Ky(Uy,e,...t):Ky(()=>PO(Uy(),e),...t),wE={extend:{classGroups:{"font-family":[{font:[e=>e.endsWith("-fontFamily")]}],"font-weight":[{font:[e=>e.endsWith("-fontWeight")]}],"font-size":[{text:[e=>e.endsWith("-fontSize")]}],"text-color":[{text:[e=>e.endsWith("-color")]}],"gap-y":[{"gap-y":[e=>e.endsWith("-verticalSpacing")]}],"max-w":[{"max-w":[e=>e.endsWith("-maxWidth")]}],"bg-color":[{"bg-color":[e=>e.endsWith("-backgroundColor")]}],rounded:[{rounded:[e=>e.endsWith("-borderRadius")]}]}}},FO=CE(wE);function xr(...e){return FO(yE(e))}const jO=CE({prefix:"ve-"});function cr(...e){return jO(yE(e))}var $d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function BO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zp={exports:{}},su={};/**
4
- * @license React
5
- * react-jsx-runtime.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */var Yy;function WO(){if(Yy)return su;Yy=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,b={},C=null,_=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(_=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(b[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)b[m]===void 0&&(b[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:_,props:b,_owner:o.current}}return su.Fragment=n,su.jsx=a,su.jsxs=a,su}var lu={};/**
12
- * @license React
13
- * react-jsx-runtime.development.js
14
- *
15
- * Copyright (c) Facebook, Inc. and its affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */var qy;function zO(){return qy||(qy=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(ae){if(ae===null||typeof ae!="object")return null;var $e=y&&ae[y]||ae[v];return typeof $e=="function"?$e:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(ae){{for(var $e=arguments.length,je=new Array($e>1?$e-1:0),at=1;at<$e;at++)je[at-1]=arguments[at];k("error",ae,je)}}function k(ae,$e,je){{var at=O.ReactDebugCurrentFrame,xt=at.getStackAddendum();xt!==""&&($e+="%s",je=je.concat([xt]));var bt=je.map(function(ht){return String(ht)});bt.unshift("Warning: "+$e),Function.prototype.apply.call(console[ae],console,bt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function K(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||oe||ae===o||ae===p||ae===m||X||ae===_||P||M||Y||typeof ae=="object"&&ae!==null&&(ae.$$typeof===C||ae.$$typeof===b||ae.$$typeof===a||ae.$$typeof===l||ae.$$typeof===u||ae.$$typeof===Z||ae.getModuleId!==void 0))}function Q(ae,$e,je){var at=ae.displayName;if(at)return at;var xt=$e.displayName||$e.name||"";return xt!==""?je+"("+xt+")":je}function de(ae){return ae.displayName||"Context"}function pe(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case l:var $e=ae;return de($e)+".Consumer";case a:var je=ae;return de(je._context)+".Provider";case u:return Q(ae,ae.render,"ForwardRef");case b:var at=ae.displayName||null;return at!==null?at:pe(ae.type)||"Memo";case C:{var xt=ae,bt=xt._payload,ht=xt._init;try{return pe(ht(bt))}catch{return null}}}return null}var ne=Object.assign,fe=0,U,j,ee,re,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){U=console.log,j=console.info,ee=console.warn,re=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}fe++}}function N(){{if(fe--,fe===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},ae,{value:U}),info:ne({},ae,{value:j}),warn:ne({},ae,{value:ee}),error:ne({},ae,{value:re}),group:ne({},ae,{value:B}),groupCollapsed:ne({},ae,{value:W}),groupEnd:ne({},ae,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(ae,$e,je){{if(q===void 0)try{throw Error()}catch(xt){var at=xt.stack.trim().match(/\n( *(at )?)/);q=at&&at[1]||""}return`
20
- `+q+ae}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(ae,$e){if(!ae||he)return"";{var je=se.get(ae);if(je!==void 0)return je}var at;he=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=I.current,I.current=null,w();try{if($e){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(Jn){at=Jn}Reflect.construct(ae,[],ht)}else{try{ht.call()}catch(Jn){at=Jn}ae.call(ht.prototype)}}else{try{throw Error()}catch(Jn){at=Jn}ae()}}catch(Jn){if(Jn&&at&&typeof Jn.stack=="string"){for(var At=Jn.stack.split(`
21
- `),Kt=at.stack.split(`
22
- `),Mt=At.length-1,Yt=Kt.length-1;Mt>=1&&Yt>=0&&At[Mt]!==Kt[Yt];)Yt--;for(;Mt>=1&&Yt>=0;Mt--,Yt--)if(At[Mt]!==Kt[Yt]){if(Mt!==1||Yt!==1)do if(Mt--,Yt--,Yt<0||At[Mt]!==Kt[Yt]){var mn=`
23
- `+At[Mt].replace(" at new "," at ");return ae.displayName&&mn.includes("<anonymous>")&&(mn=mn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&se.set(ae,mn),mn}while(Mt>=1&&Yt>=0);break}}}finally{he=!1,I.current=bt,N(),Error.prepareStackTrace=xt}var Cr=ae?ae.displayName||ae.name:"",Cn=Cr?ue(Cr):"";return typeof ae=="function"&&se.set(ae,Cn),Cn}function Be(ae,$e,je){return Oe(ae,!1)}function ce(ae){var $e=ae.prototype;return!!($e&&$e.isReactComponent)}function le(ae,$e,je){if(ae==null)return"";if(typeof ae=="function")return Oe(ae,ce(ae));if(typeof ae=="string")return ue(ae);switch(ae){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return Be(ae.render);case b:return le(ae.type,$e,je);case C:{var at=ae,xt=at._payload,bt=at._init;try{return le(bt(xt),$e,je)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Pe.setExtraStackFrame(je)}else Pe.setExtraStackFrame(null)}function Xe(ae,$e,je,at,xt){{var bt=Function.call.bind(ve);for(var ht in ae)if(bt(ae,ht)){var At=void 0;try{if(typeof ae[ht]!="function"){var Kt=Error((at||"React class")+": "+je+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Kt.name="Invariant Violation",Kt}At=ae[ht]($e,ht,at,je,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Mt){At=Mt}At&&!(At instanceof Error)&&(We(xt),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",at||"React class",je,ht,typeof At),We(null)),At instanceof Error&&!(At.message in Me)&&(Me[At.message]=!0,We(xt),R("Failed %s type: %s",je,At.message),We(null))}}}var st=Array.isArray;function dt(ae){return st(ae)}function Ct(ae){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,je=$e&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return je}}function Se(ae){try{return me(ae),!1}catch{return!0}}function me(ae){return""+ae}function _e(ae){if(Se(ae))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(ae)),me(ae)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(ae){if(ve.call(ae,"ref")){var $e=Object.getOwnPropertyDescriptor(ae,"ref").get;if($e&&$e.isReactWarning)return!1}return ae.ref!==void 0}function Et(ae){if(ve.call(ae,"key")){var $e=Object.getOwnPropertyDescriptor(ae,"key").get;if($e&&$e.isReactWarning)return!1}return ae.key!==void 0}function Bt(ae,$e){if(typeof ae.ref=="string"&&De.current&&$e&&De.current.stateNode!==$e){var je=pe(De.current.type);tt[je]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),ae.ref),tt[je]=!0)}}function Qe(ae,$e){{var je=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"key",{get:je,configurable:!0})}}function et(ae,$e){{var je=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:je,configurable:!0})}}var lt=function(ae,$e,je,at,xt,bt,ht){var At={$$typeof:t,type:ae,key:$e,ref:je,props:ht,_owner:bt};return At._store={},Object.defineProperty(At._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(At,"_self",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.defineProperty(At,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(At.props),Object.freeze(At)),At};function wt(ae,$e,je,at,xt){{var bt,ht={},At=null,Kt=null;je!==void 0&&(_e(je),At=""+je),Et($e)&&(_e($e.key),At=""+$e.key),ut($e)&&(Kt=$e.ref,Bt($e,xt));for(bt in $e)ve.call($e,bt)&&!Fe.hasOwnProperty(bt)&&(ht[bt]=$e[bt]);if(ae&&ae.defaultProps){var Mt=ae.defaultProps;for(bt in Mt)ht[bt]===void 0&&(ht[bt]=Mt[bt])}if(At||Kt){var Yt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;At&&Qe(ht,Yt),Kt&&et(ht,Yt)}return lt(ae,At,Kt,xt,at,De.current,ht)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Rt.setExtraStackFrame(je)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function kt(){{if(_t.current){var ae=pe(_t.current.type);if(ae)return`
24
-
25
- Check the render method of \``+ae+"`."}return""}}function Dt(ae){return""}var Vt={};function sn(ae){{var $e=kt();if(!$e){var je=typeof ae=="string"?ae:ae.displayName||ae.name;je&&($e=`
26
-
27
- Check the top-level render call using <`+je+">.")}return $e}}function fr(ae,$e){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var je=sn($e);if(Vt[je])return;Vt[je]=!0;var at="";ae&&ae._owner&&ae._owner!==_t.current&&(at=" It was passed a child from "+pe(ae._owner.type)+"."),qe(ae),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',je,at),qe(null)}}function Nr(ae,$e){{if(typeof ae!="object")return;if(dt(ae))for(var je=0;je<ae.length;je++){var at=ae[je];yt(at)&&fr(at,$e)}else if(yt(ae))ae._store&&(ae._store.validated=!0);else if(ae){var xt=T(ae);if(typeof xt=="function"&&xt!==ae.entries)for(var bt=xt.call(ae),ht;!(ht=bt.next()).done;)yt(ht.value)&&fr(ht.value,$e)}}}function Qo(ae){{var $e=ae.type;if($e==null||typeof $e=="string")return;var je;if(typeof $e=="function")je=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===b))je=$e.propTypes;else return;if(je){var at=pe($e);Xe(je,ae.props,"prop",at,ae)}else if($e.PropTypes!==void 0&&!ot){ot=!0;var xt=pe($e);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ia(ae){{for(var $e=Object.keys(ae.props),je=0;je<$e.length;je++){var at=$e[je];if(at!=="children"&&at!=="key"){qe(ae),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",at),qe(null);break}}ae.ref!==null&&(qe(ae),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}var Sr={};function Zn(ae,$e,je,at,xt,bt){{var ht=K(ae);if(!ht){var At="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(At+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kt=Dt();Kt?At+=Kt:At+=kt();var Mt;ae===null?Mt="null":dt(ae)?Mt="array":ae!==void 0&&ae.$$typeof===t?(Mt="<"+(pe(ae.type)||"Unknown")+" />",At=" Did you accidentally export a JSX literal instead of a component?"):Mt=typeof ae,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Mt,At)}var Yt=wt(ae,$e,je,xt,bt);if(Yt==null)return Yt;if(ht){var mn=$e.children;if(mn!==void 0)if(at)if(dt(mn)){for(var Cr=0;Cr<mn.length;Cr++)Nr(mn[Cr],ae);Object.freeze&&Object.freeze(mn)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Nr(mn,ae)}if(ve.call($e,"key")){var Cn=pe(ae),Jn=Object.keys($e).filter(function(ei){return ei!=="key"}),Ir=Jn.length>0?"{key: someKey, "+Jn.join(": ..., ")+": ...}":"{key: someKey}";if(!Sr[Cn+Ir]){var sa=Jn.length>0?"{"+Jn.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
28
- let props = %s;
29
- <%s {...props} />
30
- React keys must be passed directly to JSX without using spread:
31
- let props = %s;
32
- <%s key={someKey} {...props} />`,Ir,Cn,sa,Cn),Sr[Cn+Ir]=!0}}return ae===r?ia(Yt):Qo(Yt),Yt}}function Er(ae,$e,je){return Zn(ae,$e,je,!0)}function po(ae,$e,je){return Zn(ae,$e,je,!1)}var aa=po,Ee=Er;lu.Fragment=r,lu.jsx=aa,lu.jsxs=Ee}()),lu}process.env.NODE_ENV==="production"?zp.exports=WO():zp.exports=zO();var te=zp.exports;const HO=({document:e,entityFields:t,tailwindConfig:n,children:r})=>te.jsx($g.Provider,{value:e,children:te.jsx(uE.Provider,{value:t,children:te.jsx(Dg.Provider,{value:n,children:r})})});function kf(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];function p(b){const{scope:C,children:_,...y}=b,v=(C==null?void 0:C[e][u])||l,T=ge.useMemo(()=>y,Object.values(y));return te.jsx(v.Provider,{value:T,children:_})}function m(b,C){const _=(C==null?void 0:C[e][u])||l,y=ge.useContext(_);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${b}\` must be used within \`${i}\``)}return p.displayName=i+"Provider",[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,GO(o,...t)]}function GO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const b=u(i)[`__scope${p}`];return{...l,...b}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function VO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function TE(...e){return t=>e.forEach(n=>VO(n,t))}function ur(...e){return ge.useCallback(TE(...e),e)}var xs=ge.forwardRef((e,t)=>{const{children:n,...r}=e,o=ge.Children.toArray(n),i=o.find(KO);if(i){const a=i.props.children,l=o.map(u=>u===i?ge.Children.count(a)>1?ge.Children.only(null):ge.isValidElement(a)?a.props.children:null:u);return te.jsx(Hp,{...r,ref:t,children:ge.isValidElement(a)?ge.cloneElement(a,void 0,l):null})}return te.jsx(Hp,{...r,ref:t,children:n})});xs.displayName="Slot";var Hp=ge.forwardRef((e,t)=>{const{children:n,...r}=e;if(ge.isValidElement(n)){const o=YO(n);return ge.cloneElement(n,{...UO(r,n.props),ref:t?TE(t,o):o})}return ge.Children.count(n)>1?ge.Children.only(null):null});Hp.displayName="SlotClone";var Lg=({children:e})=>te.jsx(te.Fragment,{children:e});function KO(e){return ge.isValidElement(e)&&e.type===Lg}function UO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function YO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mn=qO.reduce((e,t)=>{const n=ge.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?xs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),te.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZO(e,t){e&&aE.flushSync(()=>e.dispatchEvent(t))}var Fg="Progress",jg=100,[JO,QJ]=kf(Fg),[XO,QO]=JO(Fg),NE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eA,...a}=e;(o||o===0)&&!Zy(o)&&console.error(tA(`${o}`,"Progress"));const l=Zy(o)?o:jg;r!==null&&!Jy(r,l)&&console.error(nA(`${r}`,"Progress"));const u=Jy(r,l)?r:null,p=df(u)?i(u,l):void 0;return te.jsx(XO,{scope:n,value:u,max:l,children:te.jsx(Mn.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":df(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":AE(u,l),"data-value":u??void 0,"data-max":l,...a,ref:t})})});NE.displayName=Fg;var SE="ProgressIndicator",OE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=QO(SE,n);return te.jsx(Mn.div,{"data-state":AE(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});OE.displayName=SE;function eA(e,t){return`${Math.round(e/t*100)}%`}function AE(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function df(e){return typeof e=="number"}function Zy(e){return df(e)&&!isNaN(e)&&e>0}function Jy(e,t){return df(e)&&!isNaN(e)&&e<=t&&e>=0}function tA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${jg}\`.`}function nA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
33
- - a positive number
34
- - less than the value passed to \`max\` (or ${jg} if no \`max\` prop is set)
35
- - \`null\` or \`undefined\` if the progress is indeterminate.
36
-
37
- Defaulting to \`null\`.`}var RE=NE,rA=OE;const $E=ge.forwardRef(({className:e,value:t,...n},r)=>te.jsx(RE,{ref:r,className:cr("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:te.jsx(rA,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));$E.displayName=RE.displayName;function Bg({progress:e}){return te.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[te.jsx($E,{className:"ve-w-1/3 ve-loading-progress",value:e}),te.jsx("div",{children:"Loading Visual Editor..."})]})}var Xy=["light","dark"],oA="(prefers-color-scheme: dark)",iA=ge.createContext(void 0),aA={setTheme:e=>{},themes:[]},sA=()=>{var e;return(e=ge.useContext(iA))!=null?e:aA};ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:u})=>{let p=i==="system",m=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,b=o?Xy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",C=(y,v=!1,T=!0)=>{let O=a?a[y]:y,R=v?y+"|| ''":`'${O}'`,k="";return o&&T&&!v&&Xy.includes(y)&&(k+=`d.style.colorScheme = '${y}';`),n==="class"?v||O?k+=`c.add(${R})`:k+="null":O&&(k+=`d[s](n,${R})`),k},_=e?`!function(){${m}${C(e)}}()`:r?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${p})){var t='${oA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${C("dark")}}else{${C("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}${p?"":"else{"+C(i,!1,!1)+"}"}${b}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}else{${C(i,!1,!1)};}${b}}catch(t){}}();`;return ge.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:_}})});var lA=e=>{switch(e){case"success":return dA;case"info":return hA;case"warning":return fA;case"error":return pA;default:return null}},cA=Array(12).fill(0),uA=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},cA.map((n,r)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),fA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mA=()=>{let[e,t]=H.useState(document.hidden);return H.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Gp=1,yA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Gp++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,a=r.then(async u=>{if(i=["resolve",u],H.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(bA(u)&&!u.ok){o=!1;let p=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:p,description:m})}else if(t.success!==void 0){o=!1;let p=typeof t.success=="function"?await t.success(u):t.success,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:p,description:m})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;let p=typeof t.error=="function"?await t.error(u):t.error,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:p,description:m})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),l=()=>new Promise((u,p)=>a.then(()=>i[0]==="reject"?p(i[1]):u(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Gp++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},ao=new yA,vA=(e,t)=>{let n=(t==null?void 0:t.id)||Gp++;return ao.addToast({title:e,...t,id:n}),n},bA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_A=vA,xA=()=>ao.toasts;Object.assign(_A,{success:ao.success,info:ao.info,warning:ao.warning,error:ao.error,custom:ao.custom,message:ao.message,promise:ao.promise,dismiss:ao.dismiss,loading:ao.loading},{getHistory:xA});function EA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}EA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
38
- `);function Dd(e){return e.label!==void 0}var CA=3,wA="32px",Qy=4e3,TA=356,NA=14,SA=20,OA=200;function AA(...e){return e.filter(Boolean).join(" ")}var RA=e=>{var t,n,r,o,i,a,l,u,p,m,b;let{invert:C,toast:_,unstyled:y,interacting:v,setHeights:T,visibleToasts:O,heights:R,index:k,toasts:P,expanded:M,removeToast:Y,defaultRichColors:X,closeButton:oe,style:Z,cancelButtonStyle:K,actionButtonStyle:Q,className:de="",descriptionClassName:pe="",duration:ne,position:fe,gap:U,loadingIcon:j,expandByDefault:ee,classNames:re,icons:B,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:J,cn:F}=e,[w,N]=H.useState(!1),[I,q]=H.useState(!1),[ue,he]=H.useState(!1),[se,Ce]=H.useState(!1),[Oe,Be]=H.useState(!1),[ce,le]=H.useState(0),[ve,Me]=H.useState(0),Pe=H.useRef(_.duration||ne||Qy),We=H.useRef(null),Xe=H.useRef(null),st=k===0,dt=k+1<=O,Ct=_.type,Se=_.dismissible!==!1,me=_.className||"",_e=_.descriptionClassName||"",De=H.useMemo(()=>R.findIndex(qe=>qe.toastId===_.id)||0,[R,_.id]),Fe=H.useMemo(()=>{var qe;return(qe=_.closeButton)!=null?qe:oe},[_.closeButton,oe]);H.useMemo(()=>_.duration||ne||Qy,[_.duration,ne]);let ke=H.useRef(0),ze=H.useRef(0),tt=H.useRef(0),ut=H.useRef(null),[Et,Bt]=fe.split("-"),Qe=H.useMemo(()=>R.reduce((qe,ot,yt)=>yt>=De?qe:qe+ot.height,0),[R,De]),et=mA(),lt=_.invert||C,wt=Ct==="loading";ze.current=H.useMemo(()=>De*U+Qe,[De,Qe]),H.useEffect(()=>{N(!0)},[]),H.useEffect(()=>{let qe=Xe.current;if(qe){let ot=qe.getBoundingClientRect().height;return Me(ot),T(yt=>[{toastId:_.id,height:ot,position:_.position},...yt]),()=>T(yt=>yt.filter(kt=>kt.toastId!==_.id))}},[T,_.id]),H.useLayoutEffect(()=>{if(!w)return;let qe=Xe.current,ot=qe.style.height;qe.style.height="auto";let yt=qe.getBoundingClientRect().height;qe.style.height=ot,Me(yt),T(kt=>kt.find(Dt=>Dt.toastId===_.id)?kt.map(Dt=>Dt.toastId===_.id?{...Dt,height:yt}:Dt):[{toastId:_.id,height:yt,position:_.position},...kt])},[w,_.title,_.description,T,_.id]);let _t=H.useCallback(()=>{q(!0),le(ze.current),T(qe=>qe.filter(ot=>ot.toastId!==_.id)),setTimeout(()=>{Y(_)},OA)},[_,Y,T,ze]);H.useEffect(()=>{if(_.promise&&Ct==="loading"||_.duration===1/0||_.type==="loading")return;let qe;return M||v||J&&et?(()=>{if(tt.current<ke.current){let ot=new Date().getTime()-ke.current;Pe.current=Pe.current-ot}tt.current=new Date().getTime()})():Pe.current!==1/0&&(ke.current=new Date().getTime(),qe=setTimeout(()=>{var ot;(ot=_.onAutoClose)==null||ot.call(_,_),_t()},Pe.current)),()=>clearTimeout(qe)},[M,v,_,Ct,J,et,_t]),H.useEffect(()=>{_.delete&&_t()},[_t,_.delete]);function Rt(){var qe,ot,yt;return B!=null&&B.loading?H.createElement("div",{className:F(re==null?void 0:re.loader,(qe=_==null?void 0:_.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":Ct==="loading"},B.loading):j?H.createElement("div",{className:F(re==null?void 0:re.loader,(ot=_==null?void 0:_.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ct==="loading"},j):H.createElement(uA,{className:F(re==null?void 0:re.loader,(yt=_==null?void 0:_.classNames)==null?void 0:yt.loader),visible:Ct==="loading"})}return H.createElement("li",{tabIndex:0,ref:Xe,className:F(de,me,re==null?void 0:re.toast,(t=_==null?void 0:_.classNames)==null?void 0:t.toast,re==null?void 0:re.default,re==null?void 0:re[Ct],(n=_==null?void 0:_.classNames)==null?void 0:n[Ct]),"data-sonner-toast":"","data-rich-colors":(r=_.richColors)!=null?r:X,"data-styled":!(_.jsx||_.unstyled||y),"data-mounted":w,"data-promise":!!_.promise,"data-swiped":Oe,"data-removed":I,"data-visible":dt,"data-y-position":Et,"data-x-position":Bt,"data-index":k,"data-front":st,"data-swiping":ue,"data-dismissible":Se,"data-type":Ct,"data-invert":lt,"data-swipe-out":se,"data-expanded":!!(M||ee&&w),style:{"--index":k,"--toasts-before":k,"--z-index":P.length-k,"--offset":`${I?ce:ze.current}px`,"--initial-height":ee?"auto":`${ve}px`,...Z,..._.style},onPointerDown:qe=>{wt||!Se||(We.current=new Date,le(ze.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(he(!0),ut.current={x:qe.clientX,y:qe.clientY}))},onPointerUp:()=>{var qe,ot,yt,kt;if(se||!Se)return;ut.current=null;let Dt=Number(((qe=Xe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Vt=new Date().getTime()-((ot=We.current)==null?void 0:ot.getTime()),sn=Math.abs(Dt)/Vt;if(Math.abs(Dt)>=SA||sn>.11){le(ze.current),(yt=_.onDismiss)==null||yt.call(_,_),_t(),Ce(!0),Be(!1);return}(kt=Xe.current)==null||kt.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:qe=>{var ot,yt,kt;if(!ut.current||!Se)return;let Dt=qe.clientY-ut.current.y,Vt=((ot=window.getSelection())==null?void 0:ot.toString().length)>0;Number(((yt=Xe.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&Be(!0),!Vt&&((kt=Xe.current)==null||kt.style.setProperty("--swipe-amount",`${Math.max(0,Dt)}px`))}},Fe&&!_.jsx?H.createElement("button",{"aria-label":W,"data-disabled":wt,"data-close-button":!0,onClick:wt||!Se?()=>{}:()=>{var qe;_t(),(qe=_.onDismiss)==null||qe.call(_,_)},className:F(re==null?void 0:re.closeButton,(o=_==null?void 0:_.classNames)==null?void 0:o.closeButton)},(i=B==null?void 0:B.close)!=null?i:gA):null,_.jsx||H.isValidElement(_.title)?_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title:H.createElement(H.Fragment,null,Ct||_.icon||_.promise?H.createElement("div",{"data-icon":"",className:F(re==null?void 0:re.icon,(a=_==null?void 0:_.classNames)==null?void 0:a.icon)},_.promise||_.type==="loading"&&!_.icon?_.icon||Rt():null,_.type!=="loading"?_.icon||(B==null?void 0:B[Ct])||lA(Ct):null):null,H.createElement("div",{"data-content":"",className:F(re==null?void 0:re.content,(l=_==null?void 0:_.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:F(re==null?void 0:re.title,(u=_==null?void 0:_.classNames)==null?void 0:u.title)},typeof _.title=="function"?_.title():_.title),_.description?H.createElement("div",{"data-description":"",className:F(pe,_e,re==null?void 0:re.description,(p=_==null?void 0:_.classNames)==null?void 0:p.description)},typeof _.description=="function"?_.description():_.description):null),H.isValidElement(_.cancel)?_.cancel:_.cancel&&Dd(_.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||K,onClick:qe=>{var ot,yt;Dd(_.cancel)&&Se&&((yt=(ot=_.cancel).onClick)==null||yt.call(ot,qe),_t())},className:F(re==null?void 0:re.cancelButton,(m=_==null?void 0:_.classNames)==null?void 0:m.cancelButton)},_.cancel.label):null,H.isValidElement(_.action)?_.action:_.action&&Dd(_.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||Q,onClick:qe=>{var ot,yt;Dd(_.action)&&((yt=(ot=_.action).onClick)==null||yt.call(ot,qe),!qe.defaultPrevented&&_t())},className:F(re==null?void 0:re.actionButton,(b=_==null?void 0:_.classNames)==null?void 0:b.actionButton)},_.action.label):null))};function ev(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var $A=H.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:p="light",richColors:m,duration:b,style:C,visibleToasts:_=CA,toastOptions:y,dir:v=ev(),gap:T=NA,loadingIcon:O,icons:R,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:P,cn:M=AA}=e,[Y,X]=H.useState([]),oe=H.useMemo(()=>Array.from(new Set([r].concat(Y.filter(J=>J.position).map(J=>J.position)))),[Y,r]),[Z,K]=H.useState([]),[Q,de]=H.useState(!1),[pe,ne]=H.useState(!1),[fe,U]=H.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=H.useRef(null),ee=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),re=H.useRef(null),B=H.useRef(!1),W=H.useCallback(J=>{X(F=>{var w;return(w=F.find(N=>N.id===J.id))!=null&&w.delete||ao.dismiss(J.id),F.filter(({id:N})=>N!==J.id)})},[]);return H.useEffect(()=>ao.subscribe(J=>{if(J.dismiss){X(F=>F.map(w=>w.id===J.id?{...w,delete:!0}:w));return}setTimeout(()=>{Fu.flushSync(()=>{X(F=>{let w=F.findIndex(N=>N.id===J.id);return w!==-1?[...F.slice(0,w),{...F[w],...J},...F.slice(w+1)]:[J,...F]})})})}),[]),H.useEffect(()=>{if(p!=="system"){U(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:F})=>{U(F?"dark":"light")})}catch{J.addListener(({matches:w})=>{try{U(w?"dark":"light")}catch(N){console.error(N)}})}},[p]),H.useEffect(()=>{Y.length<=1&&de(!1)},[Y]),H.useEffect(()=>{let J=F=>{var w,N;o.every(I=>F[I]||F.code===I)&&(de(!0),(w=j.current)==null||w.focus()),F.code==="Escape"&&(document.activeElement===j.current||(N=j.current)!=null&&N.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[o]),H.useEffect(()=>{if(j.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,B.current=!1)}},[j.current]),H.createElement("section",{"aria-label":`${k} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},oe.map((J,F)=>{var w;let[N,I]=J.split("-");return Y.length?H.createElement("ol",{key:J,dir:v==="auto"?ev():v,tabIndex:-1,ref:j,className:l,"data-sonner-toaster":!0,"data-theme":fe,"data-y-position":N,"data-lifted":Q&&Y.length>1&&!i,"data-x-position":I,style:{"--front-toast-height":`${((w=Z[0])==null?void 0:w.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||wA,"--width":`${TA}px`,"--gap":`${T}px`,...C},onBlur:q=>{B.current&&!q.currentTarget.contains(q.relatedTarget)&&(B.current=!1,re.current&&(re.current.focus({preventScroll:!0}),re.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||B.current||(B.current=!0,re.current=q.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{pe||de(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},Y.filter(q=>!q.position&&F===0||q.position===J).map((q,ue)=>{var he,se;return H.createElement(RA,{key:q.id,icons:R,index:ue,toast:q,defaultRichColors:m,duration:(he=y==null?void 0:y.duration)!=null?he:b,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:_,closeButton:(se=y==null?void 0:y.closeButton)!=null?se:a,interacting:pe,position:J,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:W,toasts:Y.filter(Ce=>Ce.position==q.position),heights:Z.filter(Ce=>Ce.position==q.position),setHeights:K,expandByDefault:i,gap:T,loadingIcon:O,expanded:Q,pauseWhenPageIsHidden:P,cn:M})})):null}))});const DA=({...e})=>{const{theme:t="system"}=sA();return te.jsx($A,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},Ss=()=>{const{sendToParent:e}=Ho("iFrameLoaded",lr),{sendToParent:t}=Ho("pushPageSets",lr),{sendToParent:n}=Ho("openQuickFind",lr),{sendToParent:r}=Ho("sendDevLayoutSaveStateData",lr),{sendToParent:o}=Ho("sendDevThemeSaveStateData",lr);return{iFrameLoaded:e,pushPageSets:t,openQuickFind:n,sendDevLayoutSaveStateData:r,sendDevThemeSaveStateData:o}},kA=()=>{const{openQuickFind:e}=Ss(),t=n=>{(n.ctrlKey||n.metaKey)&&n.key==="k"&&e()};H.useEffect(()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}),[])},ff=e=>JSON.parse(e.replace(/\\"/g,'"')),cu=new Ur,MA=e=>{const{iFrameLoaded:t}=Ss();H.useEffect(()=>{t({payload:{message:"iFrame is loaded"}})},[]);const[n,r]=H.useState(),[o,i]=H.useState(),[a,l]=H.useState(),[u,p]=H.useState(!1),[m,b]=H.useState(),[C,_]=H.useState(!1);return Pa("getTemplateMetadata",lr,(y,v)=>{const T=e.get(v.templateId);i(T);const O=v;r(v),cu.enable(O.isxYextDebug),cu.logData("TEMPLATE_METADATA",O),cu.logData("PUCK_CONFIG",T),y({status:"success",payload:{message:"payload received"}})}),Pa("getLayoutData",lr,(y,v)=>{const T=ff(v.layoutData);cu.logData("LAYOUT_DATA",T),l(T),p(!0),y({status:"success",payload:{message:"getLayoutData received"}})}),Pa("getThemeData",lr,(y,v)=>{const T=v,O=T?ff(T):{};cu.logData("THEME_DATA",O),b(O),_(!0),y({status:"success",payload:{message:"getThemeData received"}})}),{layoutData:a,layoutDataFetched:u,themeData:m,themeDataFetched:C,templateMetadata:n,puckConfig:o}};function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function PA(e,t){const n=ge.createContext(t),r=i=>{const{children:a,...l}=i,u=ge.useMemo(()=>l,Object.values(l));return te.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=ge.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function tc(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];const p=b=>{var O;const{scope:C,children:_,...y}=b,v=((O=C==null?void 0:C[e])==null?void 0:O[u])||l,T=ge.useMemo(()=>y,Object.values(y));return te.jsx(v.Provider,{value:T,children:_})};p.displayName=i+"Provider";function m(b,C){var v;const _=((v=C==null?void 0:C[e])==null?void 0:v[u])||l,y=ge.useContext(_);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${b}\` must be used within \`${i}\``)}return[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,IA(o,...t)]}function IA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const b=u(i)[`__scope${p}`];return{...l,...b}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Zi(e){const t=ge.useRef(e);return ge.useEffect(()=>{t.current=e}),ge.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function LA(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e);ge.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var FA="DismissableLayer",Vp="dismissableLayer.update",jA="dismissableLayer.pointerDownOutside",BA="dismissableLayer.focusOutside",tv,DE=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wg=ge.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,p=ge.useContext(DE),[m,b]=ge.useState(null),C=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=ge.useState({}),y=ur(t,X=>b(X)),v=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),O=v.indexOf(T),R=m?v.indexOf(m):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,P=R>=O,M=HA(X=>{const oe=X.target,Z=[...p.branches].some(K=>K.contains(oe));!P||Z||(o==null||o(X),a==null||a(X),X.defaultPrevented||l==null||l())},C),Y=GA(X=>{const oe=X.target;[...p.branches].some(K=>K.contains(oe))||(i==null||i(X),a==null||a(X),X.defaultPrevented||l==null||l())},C);return LA(X=>{R===p.layers.size-1&&(r==null||r(X),!X.defaultPrevented&&l&&(X.preventDefault(),l()))},C),ge.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(tv=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),nv(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=tv)}},[m,C,n,p]),ge.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),nv())},[m,p]),ge.useEffect(()=>{const X=()=>_({});return document.addEventListener(Vp,X),()=>document.removeEventListener(Vp,X)},[]),te.jsx(Mn.div,{...u,ref:y,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,Y.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,M.onPointerDownCapture)})});Wg.displayName=FA;var WA="DismissableLayerBranch",zA=ge.forwardRef((e,t)=>{const n=ge.useContext(DE),r=ge.useRef(null),o=ur(t,r);return ge.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),te.jsx(Mn.div,{...e,ref:o})});zA.displayName=WA;function HA(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=ge.useRef(!1),o=ge.useRef(()=>{});return ge.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){kE(jA,n,p,{discrete:!0})};const p={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GA(e,t=globalThis==null?void 0:globalThis.document){const n=Zi(e),r=ge.useRef(!1);return ge.useEffect(()=>{const o=i=>{i.target&&!r.current&&kE(BA,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nv(){const e=new CustomEvent(Vp);document.dispatchEvent(e)}function kE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ZO(o,i):o.dispatchEvent(i)}var Es=globalThis!=null&&globalThis.document?ge.useLayoutEffect:()=>{},VA=ge.useId||(()=>{}),KA=0;function Nu(e){const[t,n]=ge.useState(VA());return Es(()=>{n(r=>r??String(KA++))},[e]),t?`radix-${t}`:""}const UA=["top","right","bottom","left"],Ia=Math.min,so=Math.max,hf=Math.round,kd=Math.floor,xi=e=>({x:e,y:e}),YA={left:"right",right:"left",bottom:"top",top:"bottom"},qA={start:"end",end:"start"};function Kp(e,t,n){return so(e,Ia(t,n))}function Ji(e,t){return typeof e=="function"?e(t):e}function Xi(e){return e.split("-")[0]}function nc(e){return e.split("-")[1]}function zg(e){return e==="x"?"y":"x"}function Hg(e){return e==="y"?"height":"width"}function La(e){return["top","bottom"].includes(Xi(e))?"y":"x"}function Gg(e){return zg(La(e))}function ZA(e,t,n){n===void 0&&(n=!1);const r=nc(e),o=Gg(e),i=Hg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pf(a)),[a,pf(a)]}function JA(e){const t=pf(e);return[Up(e),t,Up(t)]}function Up(e){return e.replace(/start|end/g,t=>qA[t])}function XA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function QA(e,t,n,r){const o=nc(e);let i=XA(Xi(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Up)))),i}function pf(e){return e.replace(/left|right|bottom|top/g,t=>YA[t])}function eR(e){return{top:0,right:0,bottom:0,left:0,...e}}function ME(e){return typeof e!="number"?eR(e):{top:e,right:e,bottom:e,left:e}}function gf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function rv(e,t,n){let{reference:r,floating:o}=e;const i=La(t),a=Gg(t),l=Hg(a),u=Xi(t),p=i==="y",m=r.x+r.width/2-o.width/2,b=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let _;switch(u){case"top":_={x:m,y:r.y-o.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:b};break;case"left":_={x:r.x-o.width,y:b};break;default:_={x:r.x,y:r.y}}switch(nc(t)){case"start":_[a]-=C*(n&&p?-1:1);break;case"end":_[a]+=C*(n&&p?-1:1);break}return _}const tR=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:b}=rv(p,r,u),C=r,_={},y=0;for(let v=0;v<l.length;v++){const{name:T,fn:O}=l[v],{x:R,y:k,data:P,reset:M}=await O({x:m,y:b,initialPlacement:r,placement:C,strategy:o,middlewareData:_,rects:p,platform:a,elements:{reference:e,floating:t}});m=R??m,b=k??b,_={..._,[T]:{..._[T],...P}},M&&y<=50&&(y++,typeof M=="object"&&(M.placement&&(C=M.placement),M.rects&&(p=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:m,y:b}=rv(p,C,u)),v=-1)}return{x:m,y:b,placement:C,strategy:o,middlewareData:_}};async function $u(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:_=0}=Ji(t,e),y=ME(_),T=l[C?b==="floating"?"reference":"floating":b],O=gf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),R=b==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},M=gf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:R,offsetParent:k,strategy:u}):R);return{top:(O.top-M.top+y.top)/P.y,bottom:(M.bottom-O.bottom+y.bottom)/P.y,left:(O.left-M.left+y.left)/P.x,right:(M.right-O.right+y.right)/P.x}}const nR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:p,padding:m=0}=Ji(e,t)||{};if(p==null)return{};const b=ME(m),C={x:n,y:r},_=Gg(o),y=Hg(_),v=await a.getDimensions(p),T=_==="y",O=T?"top":"left",R=T?"bottom":"right",k=T?"clientHeight":"clientWidth",P=i.reference[y]+i.reference[_]-C[_]-i.floating[y],M=C[_]-i.reference[_],Y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let X=Y?Y[k]:0;(!X||!await(a.isElement==null?void 0:a.isElement(Y)))&&(X=l.floating[k]||i.floating[y]);const oe=P/2-M/2,Z=X/2-v[y]/2-1,K=Ia(b[O],Z),Q=Ia(b[R],Z),de=K,pe=X-v[y]-Q,ne=X/2-v[y]/2+oe,fe=Kp(de,ne,pe),U=!u.arrow&&nc(o)!=null&&ne!==fe&&i.reference[y]/2-(ne<de?K:Q)-v[y]/2<0,j=U?ne<de?ne-de:ne-pe:0;return{[_]:C[_]+j,data:{[_]:fe,centerOffset:ne-fe-j,...U&&{alignmentOffset:j}},reset:U}}}),rR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:p}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...T}=Ji(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const O=Xi(o),R=La(l),k=Xi(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=C||(k||!v?[pf(l)]:JA(l)),Y=y!=="none";!C&&Y&&M.push(...QA(l,v,y,P));const X=[l,...M],oe=await $u(t,T),Z=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&Z.push(oe[O]),b){const ne=ZA(o,a,P);Z.push(oe[ne[0]],oe[ne[1]])}if(K=[...K,{placement:o,overflows:Z}],!Z.every(ne=>ne<=0)){var Q,de;const ne=(((Q=i.flip)==null?void 0:Q.index)||0)+1,fe=X[ne];if(fe)return{data:{index:ne,overflows:K},reset:{placement:fe}};let U=(de=K.filter(j=>j.overflows[0]<=0).sort((j,ee)=>j.overflows[1]-ee.overflows[1])[0])==null?void 0:de.placement;if(!U)switch(_){case"bestFit":{var pe;const j=(pe=K.filter(ee=>{if(Y){const re=La(ee.placement);return re===R||re==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(re=>re>0).reduce((re,B)=>re+B,0)]).sort((ee,re)=>ee[1]-re[1])[0])==null?void 0:pe[0];j&&(U=j);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function ov(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iv(e){return UA.some(t=>e[t]>=0)}const oR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ji(e,t);switch(r){case"referenceHidden":{const i=await $u(t,{...o,elementContext:"reference"}),a=ov(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:iv(a)}}}case"escaped":{const i=await $u(t,{...o,altBoundary:!0}),a=ov(i,n.floating);return{data:{escapedOffsets:a,escaped:iv(a)}}}default:return{}}}}};async function iR(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Xi(n),l=nc(n),u=La(n)==="y",p=["left","top"].includes(a)?-1:1,m=i&&u?-1:1,b=Ji(t,e);let{mainAxis:C,crossAxis:_,alignmentAxis:y}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return l&&typeof y=="number"&&(_=l==="end"?y*-1:y),u?{x:_*m,y:C*p}:{x:C*p,y:_*m}}const aR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await iR(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},sR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:T=>{let{x:O,y:R}=T;return{x:O,y:R}}},...u}=Ji(e,t),p={x:n,y:r},m=await $u(t,u),b=La(Xi(o)),C=zg(b);let _=p[C],y=p[b];if(i){const T=C==="y"?"top":"left",O=C==="y"?"bottom":"right",R=_+m[T],k=_-m[O];_=Kp(R,_,k)}if(a){const T=b==="y"?"top":"left",O=b==="y"?"bottom":"right",R=y+m[T],k=y-m[O];y=Kp(R,y,k)}const v=l.fn({...t,[C]:_,[b]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[C]:i,[b]:a}}}}}},lR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:p=!0}=Ji(e,t),m={x:n,y:r},b=La(o),C=zg(b);let _=m[C],y=m[b];const v=Ji(l,t),T=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=C==="y"?"height":"width",P=i.reference[C]-i.floating[k]+T.mainAxis,M=i.reference[C]+i.reference[k]-T.mainAxis;_<P?_=P:_>M&&(_=M)}if(p){var O,R;const k=C==="y"?"width":"height",P=["top","left"].includes(Xi(o)),M=i.reference[b]-i.floating[k]+(P&&((O=a.offset)==null?void 0:O[b])||0)+(P?0:T.crossAxis),Y=i.reference[b]+i.reference[k]+(P?0:((R=a.offset)==null?void 0:R[b])||0)-(P?T.crossAxis:0);y<M?y=M:y>Y&&(y=Y)}return{[C]:_,[b]:y}}}},cR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...p}=Ji(e,t),m=await $u(t,p),b=Xi(o),C=nc(o),_=La(o)==="y",{width:y,height:v}=i.floating;let T,O;b==="top"||b==="bottom"?(T=b,O=C===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(O=b,T=C==="end"?"top":"bottom");const R=v-m.top-m.bottom,k=y-m.left-m.right,P=Ia(v-m[T],R),M=Ia(y-m[O],k),Y=!t.middlewareData.shift;let X=P,oe=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(oe=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(X=R),Y&&!C){const K=so(m.left,0),Q=so(m.right,0),de=so(m.top,0),pe=so(m.bottom,0);_?oe=y-2*(K!==0||Q!==0?K+Q:so(m.left,m.right)):X=v-2*(de!==0||pe!==0?de+pe:so(m.top,m.bottom))}await u({...t,availableWidth:oe,availableHeight:X});const Z=await a.getDimensions(l.floating);return y!==Z.width||v!==Z.height?{reset:{rects:!0}}:{}}}};function Mf(){return typeof window<"u"}function rc(e){return PE(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wi(e){var t;return(t=(PE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function PE(e){return Mf()?e instanceof Node||e instanceof uo(e).Node:!1}function Uo(e){return Mf()?e instanceof Element||e instanceof uo(e).Element:!1}function Ci(e){return Mf()?e instanceof HTMLElement||e instanceof uo(e).HTMLElement:!1}function av(e){return!Mf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot}function ju(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function uR(e){return["table","td","th"].includes(rc(e))}function Pf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Vg(e){const t=Kg(),n=Uo(e)?Yo(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function dR(e){let t=Fa(e);for(;Ci(t)&&!ql(t);){if(Vg(t))return t;if(Pf(t))return null;t=Fa(t)}return null}function Kg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ql(e){return["html","body","#document"].includes(rc(e))}function Yo(e){return uo(e).getComputedStyle(e)}function If(e){return Uo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(rc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||av(e)&&e.host||wi(e);return av(t)?t.host:t}function IE(e){const t=Fa(e);return ql(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ci(t)&&ju(t)?t:IE(t)}function Du(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=IE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=uo(o);if(i){const l=Yp(a);return t.concat(a,a.visualViewport||[],ju(o)?o:[],l&&n?Du(l):[])}return t.concat(o,Du(o,[],n))}function Yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LE(e){const t=Yo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ci(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=hf(n)!==i||hf(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Ug(e){return Uo(e)?e:e.contextElement}function zl(e){const t=Ug(e);if(!Ci(t))return xi(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=LE(t);let a=(i?hf(n.width):n.width)/r,l=(i?hf(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const fR=xi(0);function FE(e){const t=uo(e);return!Kg()||!t.visualViewport?fR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==uo(e)?!1:t}function Cs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ug(e);let a=xi(1);t&&(r?Uo(r)&&(a=zl(r)):a=zl(e));const l=hR(i,n,r)?FE(i):xi(0);let u=(o.left+l.x)/a.x,p=(o.top+l.y)/a.y,m=o.width/a.x,b=o.height/a.y;if(i){const C=uo(i),_=r&&Uo(r)?uo(r):r;let y=C,v=Yp(y);for(;v&&r&&_!==y;){const T=zl(v),O=v.getBoundingClientRect(),R=Yo(v),k=O.left+(v.clientLeft+parseFloat(R.paddingLeft))*T.x,P=O.top+(v.clientTop+parseFloat(R.paddingTop))*T.y;u*=T.x,p*=T.y,m*=T.x,b*=T.y,u+=k,p+=P,y=uo(v),v=Yp(y)}}return gf({width:m,height:b,x:u,y:p})}function Yg(e,t){const n=If(e).scrollLeft;return t?t.left+n:Cs(wi(e)).left+n}function jE(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Yg(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function pR(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=wi(r),l=t?Pf(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=xi(1);const m=xi(0),b=Ci(r);if((b||!b&&!i)&&((rc(r)!=="body"||ju(a))&&(u=If(r)),Ci(r))){const _=Cs(r);p=zl(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const C=a&&!b&&!i?jE(a,u,!0):xi(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+m.x+C.x,y:n.y*p.y-u.scrollTop*p.y+m.y+C.y}}function gR(e){return Array.from(e.getClientRects())}function mR(e){const t=wi(e),n=If(e),r=e.ownerDocument.body,o=so(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=so(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yg(e);const l=-n.scrollTop;return Yo(r).direction==="rtl"&&(a+=so(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function yR(e,t){const n=uo(e),r=wi(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const p=Kg();(!p||p&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function vR(e,t){const n=Cs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ci(e)?zl(e):xi(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,p=r*i.y;return{width:a,height:l,x:u,y:p}}function sv(e,t,n){let r;if(t==="viewport")r=yR(e,n);else if(t==="document")r=mR(wi(e));else if(Uo(t))r=vR(t,n);else{const o=FE(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gf(r)}function BE(e,t){const n=Fa(e);return n===t||!Uo(n)||ql(n)?!1:Yo(n).position==="fixed"||BE(n,t)}function bR(e,t){const n=t.get(e);if(n)return n;let r=Du(e,[],!1).filter(l=>Uo(l)&&rc(l)!=="body"),o=null;const i=Yo(e).position==="fixed";let a=i?Fa(e):e;for(;Uo(a)&&!ql(a);){const l=Yo(a),u=Vg(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ju(a)&&!u&&BE(e,a))?r=r.filter(m=>m!==a):o=l,a=Fa(a)}return t.set(e,r),r}function _R(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pf(t)?[]:bR(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((p,m)=>{const b=sv(t,m,o);return p.top=so(b.top,p.top),p.right=Ia(b.right,p.right),p.bottom=Ia(b.bottom,p.bottom),p.left=so(b.left,p.left),p},sv(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xR(e){const{width:t,height:n}=LE(e);return{width:t,height:n}}function ER(e,t,n){const r=Ci(t),o=wi(t),i=n==="fixed",a=Cs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=xi(0);if(r||!r&&!i)if((rc(t)!=="body"||ju(o))&&(l=If(t)),r){const C=Cs(t,!0,i,t);u.x=C.x+t.clientLeft,u.y=C.y+t.clientTop}else o&&(u.x=Yg(o));const p=o&&!r&&!i?jE(o,l):xi(0),m=a.left+l.scrollLeft-u.x-p.x,b=a.top+l.scrollTop-u.y-p.y;return{x:m,y:b,width:a.width,height:a.height}}function Ih(e){return Yo(e).position==="static"}function lv(e,t){if(!Ci(e)||Yo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wi(e)===n&&(n=n.ownerDocument.body),n}function WE(e,t){const n=uo(e);if(Pf(e))return n;if(!Ci(e)){let o=Fa(e);for(;o&&!ql(o);){if(Uo(o)&&!Ih(o))return o;o=Fa(o)}return n}let r=lv(e,t);for(;r&&uR(r)&&Ih(r);)r=lv(r,t);return r&&ql(r)&&Ih(r)&&!Vg(r)?n:r||dR(e)||n}const CR=async function(e){const t=this.getOffsetParent||WE,n=this.getDimensions,r=await n(e.floating);return{reference:ER(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wR(e){return Yo(e).direction==="rtl"}const TR={convertOffsetParentRelativeRectToViewportRelativeRect:pR,getDocumentElement:wi,getClippingRect:_R,getOffsetParent:WE,getElementRects:CR,getClientRects:gR,getDimensions:xR,getScale:zl,isElement:Uo,isRTL:wR};function NR(e,t){let n=null,r;const o=wi(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:p,top:m,width:b,height:C}=e.getBoundingClientRect();if(l||t(),!b||!C)return;const _=kd(m),y=kd(o.clientWidth-(p+b)),v=kd(o.clientHeight-(m+C)),T=kd(p),R={rootMargin:-_+"px "+-y+"px "+-v+"px "+-T+"px",threshold:so(0,Ia(1,u))||1};let k=!0;function P(M){const Y=M[0].intersectionRatio;if(Y!==u){if(!k)return a();Y?a(!1,Y):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(P,{...R,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,R)}n.observe(e)}return a(!0),i}function SR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=Ug(e),m=o||i?[...p?Du(p):[],...Du(t)]:[];m.forEach(O=>{o&&O.addEventListener("scroll",n,{passive:!0}),i&&O.addEventListener("resize",n)});const b=p&&l?NR(p,n):null;let C=-1,_=null;a&&(_=new ResizeObserver(O=>{let[R]=O;R&&R.target===p&&_&&(_.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var k;(k=_)==null||k.observe(t)})),n()}),p&&!u&&_.observe(p),_.observe(t));let y,v=u?Cs(e):null;u&&T();function T(){const O=Cs(e);v&&(O.x!==v.x||O.y!==v.y||O.width!==v.width||O.height!==v.height)&&n(),v=O,y=requestAnimationFrame(T)}return n(),()=>{var O;m.forEach(R=>{o&&R.removeEventListener("scroll",n),i&&R.removeEventListener("resize",n)}),b==null||b(),(O=_)==null||O.disconnect(),_=null,u&&cancelAnimationFrame(y)}}const OR=aR,AR=sR,RR=rR,$R=cR,DR=oR,cv=nR,kR=lR,MR=(e,t,n)=>{const r=new Map,o={platform:TR,...n},i={...o.platform,_c:r};return tR(e,t,{...o,platform:i})};var tf=typeof document<"u"?H.useLayoutEffect:H.useEffect;function mf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!mf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!mf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function zE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uv(e,t){const n=zE(e);return Math.round(t*n)/n}function Lh(e){const t=ge.useRef(e);return tf(()=>{t.current=e}),t}function PR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:p}=e,[m,b]=ge.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,_]=ge.useState(r);mf(C,r)||_(r);const[y,v]=ge.useState(null),[T,O]=ge.useState(null),R=ge.useCallback(ee=>{ee!==Y.current&&(Y.current=ee,v(ee))},[]),k=ge.useCallback(ee=>{ee!==X.current&&(X.current=ee,O(ee))},[]),P=i||y,M=a||T,Y=ge.useRef(null),X=ge.useRef(null),oe=ge.useRef(m),Z=u!=null,K=Lh(u),Q=Lh(o),de=Lh(p),pe=ge.useCallback(()=>{if(!Y.current||!X.current)return;const ee={placement:t,strategy:n,middleware:C};Q.current&&(ee.platform=Q.current),MR(Y.current,X.current,ee).then(re=>{const B={...re,isPositioned:de.current!==!1};ne.current&&!mf(oe.current,B)&&(oe.current=B,aE.flushSync(()=>{b(B)}))})},[C,t,n,Q,de]);tf(()=>{p===!1&&oe.current.isPositioned&&(oe.current.isPositioned=!1,b(ee=>({...ee,isPositioned:!1})))},[p]);const ne=ge.useRef(!1);tf(()=>(ne.current=!0,()=>{ne.current=!1}),[]),tf(()=>{if(P&&(Y.current=P),M&&(X.current=M),P&&M){if(K.current)return K.current(P,M,pe);pe()}},[P,M,pe,K,Z]);const fe=ge.useMemo(()=>({reference:Y,floating:X,setReference:R,setFloating:k}),[R,k]),U=ge.useMemo(()=>({reference:P,floating:M}),[P,M]),j=ge.useMemo(()=>{const ee={position:n,left:0,top:0};if(!U.floating)return ee;const re=uv(U.floating,m.x),B=uv(U.floating,m.y);return l?{...ee,transform:"translate("+re+"px, "+B+"px)",...zE(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:B}},[n,l,U.floating,m.x,m.y]);return ge.useMemo(()=>({...m,update:pe,refs:fe,elements:U,floatingStyles:j}),[m,pe,fe,U,j])}const IR=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?cv({element:r.current,padding:o}).fn(n):{}:r?cv({element:r,padding:o}).fn(n):{}}}},LR=(e,t)=>({...OR(e),options:[e,t]}),FR=(e,t)=>({...AR(e),options:[e,t]}),jR=(e,t)=>({...kR(e),options:[e,t]}),BR=(e,t)=>({...RR(e),options:[e,t]}),WR=(e,t)=>({...$R(e),options:[e,t]}),zR=(e,t)=>({...DR(e),options:[e,t]}),HR=(e,t)=>({...IR(e),options:[e,t]});var GR="Arrow",HE=ge.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return te.jsx(Mn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:te.jsx("polygon",{points:"0,0 30,0 15,10"})})});HE.displayName=GR;var VR=HE;function qg(e){const[t,n]=ge.useState(void 0);return Es(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;a=p.inlineSize,l=p.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Zg="Popper",[GE,VE]=kf(Zg),[KR,KE]=GE(Zg),UE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=ge.useState(null);return te.jsx(KR,{scope:t,anchor:r,onAnchorChange:o,children:n})};UE.displayName=Zg;var YE="PopperAnchor",qE=ge.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=KE(YE,n),a=ge.useRef(null),l=ur(t,a);return ge.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:te.jsx(Mn.div,{...o,ref:l})});qE.displayName=YE;var Jg="PopperContent",[UR,YR]=GE(Jg),ZE=ge.forwardRef((e,t)=>{var q,ue,he,se,Ce,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:b="partial",hideWhenDetached:C=!1,updatePositionStrategy:_="optimized",onPlaced:y,...v}=e,T=KE(Jg,n),[O,R]=ge.useState(null),k=ur(t,Be=>R(Be)),[P,M]=ge.useState(null),Y=qg(P),X=(Y==null?void 0:Y.width)??0,oe=(Y==null?void 0:Y.height)??0,Z=r+(i!=="center"?"-"+i:""),K=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Q=Array.isArray(p)?p:[p],de=Q.length>0,pe={padding:K,boundary:Q.filter(ZR),altBoundary:de},{refs:ne,floatingStyles:fe,placement:U,isPositioned:j,middlewareData:ee}=PR({strategy:"fixed",placement:Z,whileElementsMounted:(...Be)=>SR(...Be,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[LR({mainAxis:o+oe,alignmentAxis:a}),u&&FR({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?jR():void 0,...pe}),u&&BR({...pe}),WR({...pe,apply:({elements:Be,rects:ce,availableWidth:le,availableHeight:ve})=>{const{width:Me,height:Pe}=ce.reference,We=Be.floating.style;We.setProperty("--radix-popper-available-width",`${le}px`),We.setProperty("--radix-popper-available-height",`${ve}px`),We.setProperty("--radix-popper-anchor-width",`${Me}px`),We.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),P&&HR({element:P,padding:l}),JR({arrowWidth:X,arrowHeight:oe}),C&&zR({strategy:"referenceHidden",...pe})]}),[re,B]=QE(U),W=Zi(y);Es(()=>{j&&(W==null||W())},[j,W]);const J=(q=ee.arrow)==null?void 0:q.x,F=(ue=ee.arrow)==null?void 0:ue.y,w=((he=ee.arrow)==null?void 0:he.centerOffset)!==0,[N,I]=ge.useState();return Es(()=>{O&&I(window.getComputedStyle(O).zIndex)},[O]),te.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...fe,transform:j?fe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(se=ee.transformOrigin)==null?void 0:se.x,(Ce=ee.transformOrigin)==null?void 0:Ce.y].join(" "),...((Oe=ee.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:te.jsx(UR,{scope:n,placedSide:re,onArrowChange:M,arrowX:J,arrowY:F,shouldHideArrow:w,children:te.jsx(Mn.div,{"data-side":re,"data-align":B,...v,ref:k,style:{...v.style,animation:j?void 0:"none"}})})})});ZE.displayName=Jg;var JE="PopperArrow",qR={top:"bottom",right:"left",bottom:"top",left:"right"},XE=ge.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=YR(JE,r),a=qR[i.placedSide];return te.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:te.jsx(VR,{...o,ref:n,style:{...o.style,display:"block"}})})});XE.displayName=JE;function ZR(e){return e!==null}var JR=e=>({name:"transformOrigin",options:e,fn(t){var T,O,R;const{placement:n,rects:r,middlewareData:o}=t,a=((T=o.arrow)==null?void 0:T.centerOffset)!==0,l=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[p,m]=QE(n),b={start:"0%",center:"50%",end:"100%"}[m],C=(((O=o.arrow)==null?void 0:O.x)??0)+l/2,_=(((R=o.arrow)==null?void 0:R.y)??0)+u/2;let y="",v="";return p==="bottom"?(y=a?b:`${C}px`,v=`${-u}px`):p==="top"?(y=a?b:`${C}px`,v=`${r.floating.height+u}px`):p==="right"?(y=`${-u}px`,v=a?b:`${_}px`):p==="left"&&(y=`${r.floating.width+u}px`,v=a?b:`${_}px`),{data:{x:y,y:v}}}});function QE(e){const[t,n="center"]=e.split("-");return[t,n]}var XR=UE,QR=qE,e$=ZE,t$=XE,n$="Portal",eC=ge.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=ge.useState(!1);Es(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Fu.createPortal(te.jsx(Mn.div,{...r,ref:t}),a):null});eC.displayName=n$;function r$(e,t){return ge.useReducer((n,r)=>t[n][r]??n,e)}var oc=e=>{const{present:t,children:n}=e,r=o$(t),o=typeof n=="function"?n({present:r.isPresent}):ge.Children.only(n),i=ur(r.ref,i$(o));return typeof n=="function"||r.isPresent?ge.cloneElement(o,{ref:i}):null};oc.displayName="Presence";function o$(e){const[t,n]=ge.useState(),r=ge.useRef({}),o=ge.useRef(e),i=ge.useRef("none"),a=e?"mounted":"unmounted",[l,u]=r$(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ge.useEffect(()=>{const p=Md(r.current);i.current=l==="mounted"?p:"none"},[l]),Es(()=>{const p=r.current,m=o.current;if(m!==e){const C=i.current,_=Md(p);e?u("MOUNT"):_==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(m&&C!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Es(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,b=_=>{const v=Md(r.current).includes(_.animationName);if(_.target===t&&v&&(u("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},C=_=>{_.target===t&&(i.current=Md(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",b),t.addEventListener("animationend",b),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",b),t.removeEventListener("animationend",b)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:ge.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Md(e){return(e==null?void 0:e.animationName)||"none"}function i$(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Bu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=a$({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=Zi(n),u=ge.useCallback(p=>{if(i){const b=typeof p=="function"?p(e):p;b!==e&&l(b)}else o(p)},[i,e,o,l]);return[a,u]}function a$({defaultProp:e,onChange:t}){const n=ge.useState(e),[r]=n,o=ge.useRef(r),i=Zi(t);return ge.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var s$="VisuallyHidden",tC=ge.forwardRef((e,t)=>te.jsx(Mn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));tC.displayName=s$;var l$=tC,[Lf,eX]=tc("Tooltip",[VE]),Ff=VE(),nC="TooltipProvider",c$=700,qp="tooltip.open",[u$,Xg]=Lf(nC),rC=e=>{const{__scopeTooltip:t,delayDuration:n=c$,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=ge.useState(!0),u=ge.useRef(!1),p=ge.useRef(0);return ge.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),te.jsx(u$,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:ge.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:ge.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:ge.useCallback(m=>{u.current=m},[]),disableHoverableContent:o,children:i})};rC.displayName=nC;var jf="Tooltip",[d$,Bf]=Lf(jf),oC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=Xg(jf,e.__scopeTooltip),p=Ff(t),[m,b]=ge.useState(null),C=Nu(),_=ge.useRef(0),y=a??u.disableHoverableContent,v=l??u.delayDuration,T=ge.useRef(!1),[O=!1,R]=Bu({prop:r,defaultProp:o,onChange:X=>{X?(u.onOpen(),document.dispatchEvent(new CustomEvent(qp))):u.onClose(),i==null||i(X)}}),k=ge.useMemo(()=>O?T.current?"delayed-open":"instant-open":"closed",[O]),P=ge.useCallback(()=>{window.clearTimeout(_.current),T.current=!1,R(!0)},[R]),M=ge.useCallback(()=>{window.clearTimeout(_.current),R(!1)},[R]),Y=ge.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{T.current=!0,R(!0)},v)},[v,R]);return ge.useEffect(()=>()=>window.clearTimeout(_.current),[]),te.jsx(XR,{...p,children:te.jsx(d$,{scope:t,contentId:C,open:O,stateAttribute:k,trigger:m,onTriggerChange:b,onTriggerEnter:ge.useCallback(()=>{u.isOpenDelayed?Y():P()},[u.isOpenDelayed,Y,P]),onTriggerLeave:ge.useCallback(()=>{y?M():window.clearTimeout(_.current)},[M,y]),onOpen:P,onClose:M,disableHoverableContent:y,children:n})})};oC.displayName=jf;var Zp="TooltipTrigger",iC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Bf(Zp,n),i=Xg(Zp,n),a=Ff(n),l=ge.useRef(null),u=ur(t,l,o.onTriggerChange),p=ge.useRef(!1),m=ge.useRef(!1),b=ge.useCallback(()=>p.current=!1,[]);return ge.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),te.jsx(QR,{asChild:!0,...a,children:te.jsx(Mn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Sn(e.onPointerMove,C=>{C.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Sn(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Sn(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:Sn(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:Sn(e.onBlur,o.onClose),onClick:Sn(e.onClick,o.onClose)})})});iC.displayName=Zp;var f$="TooltipPortal",[tX,h$]=Lf(f$,{forceMount:void 0}),Zl="TooltipContent",aC=ge.forwardRef((e,t)=>{const n=h$(Zl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Bf(Zl,e.__scopeTooltip);return te.jsx(oc,{present:r||a.open,children:a.disableHoverableContent?te.jsx(sC,{side:o,...i,ref:t}):te.jsx(p$,{side:o,...i,ref:t})})}),p$=ge.forwardRef((e,t)=>{const n=Bf(Zl,e.__scopeTooltip),r=Xg(Zl,e.__scopeTooltip),o=ge.useRef(null),i=ur(t,o),[a,l]=ge.useState(null),{trigger:u,onClose:p}=n,m=o.current,{onPointerInTransitChange:b}=r,C=ge.useCallback(()=>{l(null),b(!1)},[b]),_=ge.useCallback((y,v)=>{const T=y.currentTarget,O={x:y.clientX,y:y.clientY},R=y$(O,T.getBoundingClientRect()),k=v$(O,R),P=b$(v.getBoundingClientRect()),M=x$([...k,...P]);l(M),b(!0)},[b]);return ge.useEffect(()=>()=>C(),[C]),ge.useEffect(()=>{if(u&&m){const y=T=>_(T,m),v=T=>_(T,u);return u.addEventListener("pointerleave",y),m.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",v)}}},[u,m,_,C]),ge.useEffect(()=>{if(a){const y=v=>{const T=v.target,O={x:v.clientX,y:v.clientY},R=(u==null?void 0:u.contains(T))||(m==null?void 0:m.contains(T)),k=!_$(O,a);R?C():k&&(C(),p())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,m,a,p,C]),te.jsx(sC,{...e,ref:i})}),[g$,m$]=Lf(jf,{isInside:!1}),sC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=Bf(Zl,n),p=Ff(n),{onClose:m}=u;return ge.useEffect(()=>(document.addEventListener(qp,m),()=>document.removeEventListener(qp,m)),[m]),ge.useEffect(()=>{if(u.trigger){const b=C=>{const _=C.target;_!=null&&_.contains(u.trigger)&&m()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[u.trigger,m]),te.jsx(Wg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:b=>b.preventDefault(),onDismiss:m,children:te.jsxs(e$,{"data-state":u.stateAttribute,...p,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[te.jsx(Lg,{children:r}),te.jsx(g$,{scope:n,isInside:!0,children:te.jsx(l$,{id:u.contentId,role:"tooltip",children:o||r})})]})})});aC.displayName=Zl;var lC="TooltipArrow",cC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ff(n);return m$(lC,n).isInside?null:te.jsx(t$,{...o,...r,ref:t})});cC.displayName=lC;function y$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function v$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function b$(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _$(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,p=t[a].x,m=t[a].y;u>r!=m>r&&n<(p-l)*(r-u)/(m-u)+l&&(o=!o)}return o}function x$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),E$(t)}function E$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var C$=rC,w$=oC,T$=iC,uC=aC,N$=cC;const dC=C$,fC=w$,hC=T$,pC=N$,Qg=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>te.jsx(uC,{ref:r,sideOffset:t,className:cr("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));Qg.displayName=uC.displayName;const Yr=({displayName:e,fieldId:t,constantValueEnabled:n,children:r})=>{const{tooltipsVisible:o}=yC();if(!o)return r;let i="";return e&&t?i=`${e} (${t})`:t?i=`${t}`:e&&(i=`${e}`),te.jsx("div",{children:te.jsx(dC,{children:te.jsxs(fC,{open:!!i&&!n,children:[te.jsx(hC,{asChild:!0,children:te.jsx("div",{className:"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]",children:r})}),te.jsxs(Qg,{children:[te.jsx("p",{children:i}),te.jsx(pC,{fill:"bg-popover"})]})]})})})},gC=H.createContext(void 0),mC=({children:e})=>{const[t,n]=H.useState(!1),r=()=>{n(o=>!o)};return te.jsx(gC.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},yC=()=>{const e=H.useContext(gC);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}};/**
39
- * @license lucide-react v0.414.0 - ISC
40
- *
41
- * This source code is licensed under the ISC license.
42
- * See the LICENSE file in the root directory of this source tree.
43
- */const S$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vC=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
44
- * @license lucide-react v0.414.0 - ISC
45
- *
46
- * This source code is licensed under the ISC license.
47
- * See the LICENSE file in the root directory of this source tree.
48
- */var O$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
49
- * @license lucide-react v0.414.0 - ISC
50
- *
51
- * This source code is licensed under the ISC license.
52
- * See the LICENSE file in the root directory of this source tree.
53
- */const A$=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},u)=>H.createElement("svg",{ref:u,...O$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vC("lucide",o),...l},[...a.map(([p,m])=>H.createElement(p,m)),...Array.isArray(i)?i:[i]]));/**
54
- * @license lucide-react v0.414.0 - ISC
55
- *
56
- * This source code is licensed under the ISC license.
57
- * See the LICENSE file in the root directory of this source tree.
58
- */const Ti=(e,t)=>{const n=H.forwardRef(({className:r,...o},i)=>H.createElement(A$,{ref:i,iconNode:t,className:vC(`lucide-${S$(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
59
- * @license lucide-react v0.414.0 - ISC
60
- *
61
- * This source code is licensed under the ISC license.
62
- * See the LICENSE file in the root directory of this source tree.
63
- */const em=Ti("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
64
- * @license lucide-react v0.414.0 - ISC
65
- *
66
- * This source code is licensed under the ISC license.
67
- * See the LICENSE file in the root directory of this source tree.
68
- */const R$=Ti("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
69
- * @license lucide-react v0.414.0 - ISC
70
- *
71
- * This source code is licensed under the ISC license.
72
- * See the LICENSE file in the root directory of this source tree.
73
- */const $$=Ti("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
74
- * @license lucide-react v0.414.0 - ISC
75
- *
76
- * This source code is licensed under the ISC license.
77
- * See the LICENSE file in the root directory of this source tree.
78
- */const D$=Ti("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
79
- * @license lucide-react v0.414.0 - ISC
80
- *
81
- * This source code is licensed under the ISC license.
82
- * See the LICENSE file in the root directory of this source tree.
83
- */const k$=Ti("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
84
- * @license lucide-react v0.414.0 - ISC
85
- *
86
- * This source code is licensed under the ISC license.
87
- * See the LICENSE file in the root directory of this source tree.
88
- */const M$=Ti("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
89
- * @license lucide-react v0.414.0 - ISC
90
- *
91
- * This source code is licensed under the ISC license.
92
- * See the LICENSE file in the root directory of this source tree.
93
- */const P$=Ti("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
94
- * @license lucide-react v0.414.0 - ISC
95
- *
96
- * This source code is licensed under the ISC license.
97
- * See the LICENSE file in the root directory of this source tree.
98
- */const I$=Ti("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
99
- * @license lucide-react v0.414.0 - ISC
100
- *
101
- * This source code is licensed under the ISC license.
102
- * See the LICENSE file in the root directory of this source tree.
103
- */const L$=Ti("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
104
- * @license lucide-react v0.414.0 - ISC
105
- *
106
- * This source code is licensed under the ISC license.
107
- * See the LICENSE file in the root directory of this source tree.
108
- */const F$=Ti("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function bC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=bC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function j$(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=bC(e))&&(r&&(r+=" "),r+=t);return r}const dv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,fv=j$,Tr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],b=i==null?void 0:i[p];if(m===null)return null;const C=dv(m)||dv(b);return o[p][C]}),l=n&&Object.entries(n).reduce((p,m)=>{let[b,C]=m;return C===void 0||(p[b]=C),p},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:b,className:C,..._}=m;return Object.entries(_).every(y=>{let[v,T]=y;return Array.isArray(T)?T.includes({...i,...l}[v]):{...i,...l}[v]===T})?[...p,b,C]:p},[]);return fv(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},tm=Tr("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),qi=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?xs:"button";return te.jsx(a,{className:cr(tm({variant:t,size:n,className:e})),ref:i,...o})});qi.displayName="Button";const _C=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Vn.usePuck(),r=H.useCallback(o=>{const i=window.matchMedia("(min-width: 638px)").matches,a=o==="left"?t:n,l=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!a,...i?{}:{[l]:!1}}})},[e,t,n]);return te.jsxs(te.Fragment,{children:[te.jsx(qi,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:te.jsx(D$,{className:"sm-icon"})}),te.jsx(qi,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:te.jsx(k$,{className:"sm-icon"})})]})};function xC(e){const t=ge.useRef({value:e,previous:e});return ge.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nm="Switch",[B$,nX]=tc(nm),[W$,z$]=B$(nm),EC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:p,form:m,...b}=e,[C,_]=ge.useState(null),y=ur(t,k=>_(k)),v=ge.useRef(!1),T=C?m||!!C.closest("form"):!0,[O=!1,R]=Bu({prop:o,defaultProp:i,onChange:p});return te.jsxs(W$,{scope:n,checked:O,disabled:l,children:[te.jsx(Mn.button,{type:"button",role:"switch","aria-checked":O,"aria-required":a,"data-state":TC(O),"data-disabled":l?"":void 0,disabled:l,value:u,...b,ref:y,onClick:Sn(e.onClick,k=>{R(P=>!P),T&&(v.current=k.isPropagationStopped(),v.current||k.stopPropagation())})}),T&&te.jsx(H$,{control:C,bubbles:!v.current,name:r,value:u,checked:O,required:a,disabled:l,form:m,style:{transform:"translateX(-100%)"}})]})});EC.displayName=nm;var CC="SwitchThumb",wC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=z$(CC,n);return te.jsx(Mn.span,{"data-state":TC(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});wC.displayName=CC;var H$=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=xC(n),l=qg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&b){const C=new Event("click",{bubbles:r});b.call(u,n),u.dispatchEvent(C)}},[a,n,r]),te.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function TC(e){return e?"checked":"unchecked"}var NC=EC,G$=wC;const SC=ge.forwardRef(({className:e,...t},n)=>te.jsx(NC,{className:cr("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:te.jsx(G$,{className:cr("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));SC.displayName=NC.displayName;const OC=()=>{const{toggleTooltips:e,tooltipsVisible:t}=yC();return te.jsx(dC,{children:te.jsxs(fC,{children:[te.jsx(hC,{asChild:!0,children:te.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[te.jsx(SC,{onCheckedChange:e,checked:t}),te.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),te.jsxs(Qg,{children:[t?"Hide Entity Fields":"Show Entity Fields",te.jsx(pC,{fill:"ve-bg-popover"})]})]})})};var Fh="focusScope.autoFocusOnMount",jh="focusScope.autoFocusOnUnmount",hv={bubbles:!1,cancelable:!0},V$="FocusScope",AC=ge.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=ge.useState(null),p=Zi(o),m=Zi(i),b=ge.useRef(null),C=ur(t,v=>u(v)),_=ge.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ge.useEffect(()=>{if(r){let v=function(k){if(_.paused||!l)return;const P=k.target;l.contains(P)?b.current=P:$a(b.current,{select:!0})},T=function(k){if(_.paused||!l)return;const P=k.relatedTarget;P!==null&&(l.contains(P)||$a(b.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&$a(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",T);const R=new MutationObserver(O);return l&&R.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",T),R.disconnect()}}},[r,l,_.paused]),ge.useEffect(()=>{if(l){gv.add(_);const v=document.activeElement;if(!l.contains(v)){const O=new CustomEvent(Fh,hv);l.addEventListener(Fh,p),l.dispatchEvent(O),O.defaultPrevented||(K$(J$(RC(l)),{select:!0}),document.activeElement===v&&$a(l))}return()=>{l.removeEventListener(Fh,p),setTimeout(()=>{const O=new CustomEvent(jh,hv);l.addEventListener(jh,m),l.dispatchEvent(O),O.defaultPrevented||$a(v??document.body,{select:!0}),l.removeEventListener(jh,m),gv.remove(_)},0)}}},[l,p,m,_]);const y=ge.useCallback(v=>{if(!n&&!r||_.paused)return;const T=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,O=document.activeElement;if(T&&O){const R=v.currentTarget,[k,P]=U$(R);k&&P?!v.shiftKey&&O===P?(v.preventDefault(),n&&$a(k,{select:!0})):v.shiftKey&&O===k&&(v.preventDefault(),n&&$a(P,{select:!0})):O===R&&v.preventDefault()}},[n,r,_.paused]);return te.jsx(Mn.div,{tabIndex:-1,...a,ref:C,onKeyDown:y})});AC.displayName=V$;function K$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($a(r,{select:t}),document.activeElement!==n)return}function U$(e){const t=RC(e),n=pv(t,e),r=pv(t.reverse(),e);return[n,r]}function RC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pv(e,t){for(const n of e)if(!Y$(n,{upTo:t}))return n}function Y$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function q$(e){return e instanceof HTMLInputElement&&"select"in e}function $a(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q$(e)&&t&&e.select()}}var gv=Z$();function Z$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=mv(e,t),e.unshift(t)},remove(t){var n;e=mv(e,t),(n=e[0])==null||n.resume()}}}function mv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function J$(e){return e.filter(t=>t.tagName!=="A")}var Bh=0;function X$(){ge.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??yv()),document.body.insertAdjacentElement("beforeend",e[1]??yv()),Bh++,()=>{Bh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bh--}},[])}function yv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _i=function(){return _i=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_i.apply(this,arguments)};function $C(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Q$(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var nf="right-scroll-bar-position",rf="width-before-scroll-bar",eD="with-scroll-bars-hidden",tD="--removed-body-scroll-bar-size";function Wh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nD(e,t){var n=H.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var rD=typeof window<"u"?ge.useLayoutEffect:ge.useEffect,vv=new WeakMap;function oD(e,t){var n=nD(null,function(r){return e.forEach(function(o){return Wh(o,r)})});return rD(function(){var r=vv.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Wh(l,null)}),i.forEach(function(l){o.has(l)||Wh(l,a)})}vv.set(n,e)},[e]),n}function iD(e){return e}function aD(e,t){t===void 0&&(t=iD);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var m=a;a=[],m.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(m){a.push(m),p()},filter:function(m){return a=a.filter(m),n}}}};return o}function sD(e){e===void 0&&(e={});var t=aD(null);return t.options=_i({async:!0,ssr:!1},e),t}var DC=function(e){var t=e.sideCar,n=$C(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return ge.createElement(r,_i({},n))};DC.isSideCarExport=!0;function lD(e,t){return e.useMedium(t),DC}var kC=sD(),zh=function(){},Wf=ge.forwardRef(function(e,t){var n=ge.useRef(null),r=ge.useState({onScrollCapture:zh,onWheelCapture:zh,onTouchMoveCapture:zh}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,p=e.removeScrollBar,m=e.enabled,b=e.shards,C=e.sideCar,_=e.noIsolation,y=e.inert,v=e.allowPinchZoom,T=e.as,O=T===void 0?"div":T,R=e.gapMode,k=$C(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=C,M=oD([n,t]),Y=_i(_i({},k),o);return ge.createElement(ge.Fragment,null,m&&ge.createElement(P,{sideCar:kC,removeScrollBar:p,shards:b,noIsolation:_,inert:y,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:R}),a?ge.cloneElement(ge.Children.only(l),_i(_i({},Y),{ref:M})):ge.createElement(O,_i({},Y,{className:u,ref:M}),l))});Wf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wf.classNames={fullWidth:rf,zeroRight:nf};var cD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cD();return t&&e.setAttribute("nonce",t),e}function dD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uD())&&(dD(t,n),fD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pD=function(){var e=hD();return function(t,n){ge.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MC=function(){var e=pD(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gD={left:0,top:0,right:0,gap:0},Hh=function(e){return parseInt(e||"",10)||0},mD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Hh(n),Hh(r),Hh(o)]},yD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gD;var t=mD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vD=MC(),Hl="data-scroll-locked",bD=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
109
- .`.concat(eD,` {
110
- overflow: hidden `).concat(r,`;
111
- padding-right: `).concat(l,"px ").concat(r,`;
112
- }
113
- body[`).concat(Hl,`] {
114
- overflow: hidden `).concat(r,`;
115
- overscroll-behavior: contain;
116
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
117
- padding-left: `.concat(o,`px;
118
- padding-top: `).concat(i,`px;
119
- padding-right: `).concat(a,`px;
120
- margin-left:0;
121
- margin-top:0;
122
- margin-right: `).concat(l,"px ").concat(r,`;
123
- `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
124
- }
125
-
126
- .`).concat(nf,` {
127
- right: `).concat(l,"px ").concat(r,`;
128
- }
129
-
130
- .`).concat(rf,` {
131
- margin-right: `).concat(l,"px ").concat(r,`;
132
- }
133
-
134
- .`).concat(nf," .").concat(nf,` {
135
- right: 0 `).concat(r,`;
136
- }
137
-
138
- .`).concat(rf," .").concat(rf,` {
139
- margin-right: 0 `).concat(r,`;
140
- }
141
-
142
- body[`).concat(Hl,`] {
143
- `).concat(tD,": ").concat(l,`px;
144
- }
145
- `)},bv=function(){var e=parseInt(document.body.getAttribute(Hl)||"0",10);return isFinite(e)?e:0},_D=function(){ge.useEffect(function(){return document.body.setAttribute(Hl,(bv()+1).toString()),function(){var e=bv()-1;e<=0?document.body.removeAttribute(Hl):document.body.setAttribute(Hl,e.toString())}},[])},xD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;_D();var i=ge.useMemo(function(){return yD(o)},[o]);return ge.createElement(vD,{styles:bD(i,!t,o,n?"":"!important")})},Jp=!1;if(typeof window<"u")try{var Pd=Object.defineProperty({},"passive",{get:function(){return Jp=!0,!0}});window.addEventListener("test",Pd,Pd),window.removeEventListener("test",Pd,Pd)}catch{Jp=!1}var gl=Jp?{passive:!1}:!1,ED=function(e){return e.tagName==="TEXTAREA"},PC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ED(e)&&n[t]==="visible")},CD=function(e){return PC(e,"overflowY")},wD=function(e){return PC(e,"overflowX")},_v=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=IC(e,r);if(o){var i=LC(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ND=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IC=function(e,t){return e==="v"?CD(t):wD(t)},LC=function(e,t){return e==="v"?TD(t):ND(t)},SD=function(e,t){return e==="h"&&t==="rtl"?-1:1},OD=function(e,t,n,r,o){var i=SD(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),p=!1,m=a>0,b=0,C=0;do{var _=LC(e,l),y=_[0],v=_[1],T=_[2],O=v-T-i*y;(y||O)&&IC(e,l)&&(b+=O,C+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(m&&(Math.abs(b)<1||!o)||!m&&(Math.abs(C)<1||!o))&&(p=!0),p},Id=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xv=function(e){return[e.deltaX,e.deltaY]},Ev=function(e){return e&&"current"in e?e.current:e},AD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},RD=function(e){return`
146
- .block-interactivity-`.concat(e,` {pointer-events: none;}
147
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
148
- `)},$D=0,ml=[];function DD(e){var t=ge.useRef([]),n=ge.useRef([0,0]),r=ge.useRef(),o=ge.useState($D++)[0],i=ge.useState(MC)[0],a=ge.useRef(e);ge.useEffect(function(){a.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Q$([e.lockRef.current],(e.shards||[]).map(Ev),!0).filter(Boolean);return v.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=ge.useCallback(function(v,T){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var O=Id(v),R=n.current,k="deltaX"in v?v.deltaX:R[0]-O[0],P="deltaY"in v?v.deltaY:R[1]-O[1],M,Y=v.target,X=Math.abs(k)>Math.abs(P)?"h":"v";if("touches"in v&&X==="h"&&Y.type==="range")return!1;var oe=_v(X,Y);if(!oe)return!0;if(oe?M=X:(M=X==="v"?"h":"v",oe=_v(X,Y)),!oe)return!1;if(!r.current&&"changedTouches"in v&&(k||P)&&(r.current=M),!M)return!0;var Z=r.current||M;return OD(Z,T,v,Z==="h"?k:P,!0)},[]),u=ge.useCallback(function(v){var T=v;if(!(!ml.length||ml[ml.length-1]!==i)){var O="deltaY"in T?xv(T):Id(T),R=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&AD(M.delta,O)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var k=(a.current.shards||[]).map(Ev).filter(Boolean).filter(function(M){return M.contains(T.target)}),P=k.length>0?l(T,k[0]):!a.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),p=ge.useCallback(function(v,T,O,R){var k={name:v,delta:T,target:O,should:R,shadowParent:kD(O)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(P){return P!==k})},1)},[]),m=ge.useCallback(function(v){n.current=Id(v),r.current=void 0},[]),b=ge.useCallback(function(v){p(v.type,xv(v),v.target,l(v,e.lockRef.current))},[]),C=ge.useCallback(function(v){p(v.type,Id(v),v.target,l(v,e.lockRef.current))},[]);ge.useEffect(function(){return ml.push(i),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:C}),document.addEventListener("wheel",u,gl),document.addEventListener("touchmove",u,gl),document.addEventListener("touchstart",m,gl),function(){ml=ml.filter(function(v){return v!==i}),document.removeEventListener("wheel",u,gl),document.removeEventListener("touchmove",u,gl),document.removeEventListener("touchstart",m,gl)}},[]);var _=e.removeScrollBar,y=e.inert;return ge.createElement(ge.Fragment,null,y?ge.createElement(i,{styles:RD(o)}):null,_?ge.createElement(xD,{gapMode:e.gapMode}):null)}function kD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const MD=lD(kC,DD);var FC=ge.forwardRef(function(e,t){return ge.createElement(Wf,_i({},e,{ref:t,sideCar:MD}))});FC.classNames=Wf.classNames;var PD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yl=new WeakMap,Ld=new WeakMap,Fd={},Gh=0,jC=function(e){return e&&(e.host||jC(e.parentNode))},ID=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LD=function(e,t,n,r){var o=ID(t,Array.isArray(e)?e:[e]);Fd[n]||(Fd[n]=new WeakMap);var i=Fd[n],a=[],l=new Set,u=new Set(o),p=function(b){!b||l.has(b)||(l.add(b),p(b.parentNode))};o.forEach(p);var m=function(b){!b||u.has(b)||Array.prototype.forEach.call(b.children,function(C){if(l.has(C))m(C);else try{var _=C.getAttribute(r),y=_!==null&&_!=="false",v=(yl.get(C)||0)+1,T=(i.get(C)||0)+1;yl.set(C,v),i.set(C,T),a.push(C),v===1&&y&&Ld.set(C,!0),T===1&&C.setAttribute(n,"true"),y||C.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",C,O)}})};return m(t),l.clear(),Gh++,function(){a.forEach(function(b){var C=yl.get(b)-1,_=i.get(b)-1;yl.set(b,C),i.set(b,_),C||(Ld.has(b)||b.removeAttribute(r),Ld.delete(b)),_||b.removeAttribute(n)}),Gh--,Gh||(yl=new WeakMap,yl=new WeakMap,Ld=new WeakMap,Fd={})}},FD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=PD(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),LD(r,o,n,"aria-hidden")):function(){return null}},rm="Dialog",[BC,WC]=tc(rm),[jD,Zo]=BC(rm),zC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=ge.useRef(null),u=ge.useRef(null),[p=!1,m]=Bu({prop:r,defaultProp:o,onChange:i});return te.jsx(jD,{scope:t,triggerRef:l,contentRef:u,contentId:Nu(),titleId:Nu(),descriptionId:Nu(),open:p,onOpenChange:m,onOpenToggle:ge.useCallback(()=>m(b=>!b),[m]),modal:a,children:n})};zC.displayName=rm;var HC="DialogTrigger",GC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zo(HC,n),i=ur(t,o.triggerRef);return te.jsx(Mn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":am(o.open),...r,ref:i,onClick:Sn(e.onClick,o.onOpenToggle)})});GC.displayName=HC;var om="DialogPortal",[BD,VC]=BC(om,{forceMount:void 0}),KC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Zo(om,t);return te.jsx(BD,{scope:t,forceMount:n,children:ge.Children.map(r,a=>te.jsx(oc,{present:n||i.open,children:te.jsx(eC,{asChild:!0,container:o,children:a})}))})};KC.displayName=om;var yf="DialogOverlay",UC=ge.forwardRef((e,t)=>{const n=VC(yf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Zo(yf,e.__scopeDialog);return i.modal?te.jsx(oc,{present:r||i.open,children:te.jsx(WD,{...o,ref:t})}):null});UC.displayName=yf;var WD=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zo(yf,n);return te.jsx(FC,{as:xs,allowPinchZoom:!0,shards:[o.contentRef],children:te.jsx(Mn.div,{"data-state":am(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ws="DialogContent",YC=ge.forwardRef((e,t)=>{const n=VC(ws,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Zo(ws,e.__scopeDialog);return te.jsx(oc,{present:r||i.open,children:i.modal?te.jsx(zD,{...o,ref:t}):te.jsx(HD,{...o,ref:t})})});YC.displayName=ws;var zD=ge.forwardRef((e,t)=>{const n=Zo(ws,e.__scopeDialog),r=ge.useRef(null),o=ur(t,n.contentRef,r);return ge.useEffect(()=>{const i=r.current;if(i)return FD(i)},[]),te.jsx(qC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:Sn(e.onFocusOutside,i=>i.preventDefault())})}),HD=ge.forwardRef((e,t)=>{const n=Zo(ws,e.__scopeDialog),r=ge.useRef(!1),o=ge.useRef(!1);return te.jsx(qC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),qC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Zo(ws,n),u=ge.useRef(null),p=ur(t,u);return X$(),te.jsxs(te.Fragment,{children:[te.jsx(AC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:te.jsx(Wg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":am(l.open),...a,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),te.jsxs(te.Fragment,{children:[te.jsx(VD,{titleId:l.titleId}),te.jsx(UD,{contentRef:u,descriptionId:l.descriptionId})]})]})}),im="DialogTitle",ZC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zo(im,n);return te.jsx(Mn.h2,{id:o.titleId,...r,ref:t})});ZC.displayName=im;var JC="DialogDescription",XC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zo(JC,n);return te.jsx(Mn.p,{id:o.descriptionId,...r,ref:t})});XC.displayName=JC;var QC="DialogClose",ew=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Zo(QC,n);return te.jsx(Mn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>o.onOpenChange(!1))})});ew.displayName=QC;function am(e){return e?"open":"closed"}var tw="DialogTitleWarning",[GD,nw]=PA(tw,{contentName:ws,titleName:im,docsSlug:"dialog"}),VD=({titleId:e})=>{const t=nw(tw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
149
-
150
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
151
-
152
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},KD="DialogDescriptionWarning",UD=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nw(KD).contentName}}.`;return ge.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},YD=zC,qD=GC,ZD=KC,JD=UC,XD=YC,QD=ZC,ek=XC,rw=ew,ow="AlertDialog",[tk,rX]=tc(ow,[WC]),ta=WC(),iw=e=>{const{__scopeAlertDialog:t,...n}=e,r=ta(t);return te.jsx(YD,{...r,...n,modal:!0})};iw.displayName=ow;var nk="AlertDialogTrigger",aw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ta(n);return te.jsx(qD,{...o,...r,ref:t})});aw.displayName=nk;var rk="AlertDialogPortal",sw=e=>{const{__scopeAlertDialog:t,...n}=e,r=ta(t);return te.jsx(ZD,{...r,...n})};sw.displayName=rk;var ok="AlertDialogOverlay",lw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ta(n);return te.jsx(JD,{...o,...r,ref:t})});lw.displayName=ok;var Gl="AlertDialogContent",[ik,ak]=tk(Gl),cw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=ta(n),a=ge.useRef(null),l=ur(t,a),u=ge.useRef(null);return te.jsx(GD,{contentName:Gl,titleName:uw,docsSlug:"alert-dialog",children:te.jsx(ik,{scope:n,cancelRef:u,children:te.jsxs(XD,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:Sn(o.onOpenAutoFocus,p=>{var m;p.preventDefault(),(m=u.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[te.jsx(Lg,{children:r}),te.jsx(lk,{contentRef:a})]})})})});cw.displayName=Gl;var uw="AlertDialogTitle",dw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ta(n);return te.jsx(QD,{...o,...r,ref:t})});dw.displayName=uw;var fw="AlertDialogDescription",hw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ta(n);return te.jsx(ek,{...o,...r,ref:t})});hw.displayName=fw;var sk="AlertDialogAction",pw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ta(n);return te.jsx(rw,{...o,...r,ref:t})});pw.displayName=sk;var gw="AlertDialogCancel",mw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=ak(gw,n),i=ta(n),a=ur(t,o);return te.jsx(rw,{...i,...r,ref:a})});mw.displayName=gw;var lk=({contentRef:e})=>{const t=`\`${Gl}\` requires a description for the component to be accessible for screen reader users.
153
-
154
- You can add a description to the \`${Gl}\` by passing a \`${fw}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
155
-
156
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Gl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
157
-
158
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return ge.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ck=iw,uk=aw,dk=sw,yw=lw,vw=cw,bw=pw,_w=mw,xw=dw,Ew=hw;const fk=ck,hk=uk,pk=dk,Cw=ge.forwardRef(({className:e,...t},n)=>te.jsx(yw,{className:cr("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));Cw.displayName=yw.displayName;const ww=ge.forwardRef(({className:e,...t},n)=>te.jsxs(pk,{children:[te.jsx(Cw,{}),te.jsx(vw,{ref:n,className:cr("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));ww.displayName=vw.displayName;const Tw=({className:e,...t})=>te.jsx("div",{className:cr("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});Tw.displayName="AlertDialogHeader";const Nw=({className:e,...t})=>te.jsx("div",{className:cr("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});Nw.displayName="AlertDialogFooter";const Sw=ge.forwardRef(({className:e,...t},n)=>te.jsx(xw,{ref:n,className:cr("ve-text-lg ve-font-semibold",e),...t}));Sw.displayName=xw.displayName;const Ow=ge.forwardRef(({className:e,...t},n)=>te.jsx(Ew,{ref:n,className:cr("ve-text-sm ve-text-muted-foreground",e),...t}));Ow.displayName=Ew.displayName;const gk=ge.forwardRef(({className:e,...t},n)=>te.jsx(bw,{ref:n,className:cr(tm(),e),...t}));gk.displayName=bw.displayName;const Aw=ge.forwardRef(({className:e,...t},n)=>te.jsx(_w,{ref:n,className:cr(tm({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Aw.displayName=_w.displayName;const Rw=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=H.useState(!1),o=()=>{t(),r(!1)};return te.jsxs(fk,{open:n,onOpenChange:r,children:[te.jsx(hk,{disabled:e,asChild:!0,children:te.jsx(qi,{variant:"outline",children:"Clear Local Changes"})}),te.jsxs(ww,{children:[te.jsxs(Tw,{children:[te.jsx(Sw,{children:"Clear Local Changes"}),te.jsx(Ow,{children:"This action will remove your local changes. It cannot be undone."})]}),te.jsxs(Nw,{children:[te.jsx(Aw,{children:"Cancel"}),te.jsx(qi,{onClick:o,children:"Confirm"})]})]})]})},mk=e=>{const{onClearLocalChanges:t,onHistoryChange:n,onPublishLayout:r,isDevMode:o}=e,{appState:i,history:{back:a,forward:l,histories:u,index:p,hasPast:m,hasFuture:b,setHistories:C}}=Vn.usePuck();return H.useEffect(()=>{n(u,p)},[p,u,n]),te.jsxs("header",{className:"puck-header",children:[te.jsxs("div",{className:"header-left",children:[te.jsx(_C,{}),te.jsx(OC,{})]}),te.jsx("div",{className:"header-center"}),te.jsxs("div",{className:"actions",children:[te.jsx(qi,{variant:"ghost",size:"icon",disabled:!m,onClick:a,children:te.jsx(I$,{className:"sm-icon"})}),te.jsx(qi,{variant:"ghost",size:"icon",disabled:!b,onClick:l,children:te.jsx(L$,{className:"sm-icon"})}),te.jsx(Rw,{disabled:u.length===1,onClearLocalChanges:()=>{t(),C([{id:"root",state:{data:u[0].state.data}}])}}),!o&&te.jsx(qi,{variant:"secondary",disabled:u.length===1,onClick:async()=>{await r(i.data),t(),C([{id:"root",state:{data:i.data}}])},children:"Publish"})]})]})},vl=new Ur,yk=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,layoutSaveState:i,saveLayoutSaveState:a,publishLayout:l,sendDevSaveStateData:u,buildVisualConfigLocalStorageKey:p})=>{const[m,b]=H.useState(!1),C=H.useRef(0),_=H.useCallback((O,R)=>{R!==0&&C.current!==R&&O.length>0&&(vl.logFunc("handleHistoryChange"),vl.logData("PUCK_INDEX",R),vl.logData("PUCK_HISTORY",O),C.current=R,vl.logFunc("saveToLocalStorage"),window.localStorage.setItem(p(),JSON.stringify(O)),(i==null?void 0:i.hash)!==O[R].id&&(o.isDevMode&&!o.devOverride?(vl.logFunc("sendDevSaveStateData"),u({payload:{devSaveStateData:JSON.stringify(O[R].state.data)}})):(vl.logFunc("saveLayoutSaveState"),a({payload:{hash:O[R].id,history:JSON.stringify(O[R].state)}}))))},[o,p,i]),y=()=>{r(),C.current=0},v=async O=>{l({payload:{layoutData:JSON.stringify(O)}})},T=async()=>{if(!n&&!m){b(!0);return}};return te.jsx(mC,{children:te.jsx(Vn.Puck,{config:e,data:{},initialHistory:t,onChange:T,overrides:{header:()=>te.jsx(mk,{onClearLocalChanges:y,onHistoryChange:_,onPublishLayout:v,isDevMode:o.isDevMode})}})})},vk={GLOBAL:"global",INDIVIDUAL:"individual"},Cv="ROLE_",wv="TEMPLATE_",bk="LAYOUT_",_k="ENTITY_",xk=new Ur,$w=e=>{const t=H.useCallback(()=>e?Ek(e.isDevMode&&!e.devOverride,e.role,e.templateId,e.layoutId,e.entityId):"",[e]);return{clearVisualConfigLocalStorage:()=>{xk.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(t())},buildVisualConfigLocalStorageKey:t}};function Ek(e,t,n,r,o){const i=e?"dev":"";if(!t||!n||!o&&!r)throw new Error(`Unable to generate local storage key, missing query parameters${!o&&" entityId"}${!r&&" layoutId"}`);if(t===vk.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return i+Cv+t+wv+n+_k+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return i+Cv+t+wv+n+bk+r}const Ck=()=>{const{sendToParent:e}=Ho("saveLayoutSaveState",lr),{sendToParent:t}=Ho("deleteLayoutSaveState",lr),{sendToParent:n}=Ho("publishLayout",lr);return{saveLayoutSaveState:e,deleteLayoutSaveState:t,publishLayout:n}},wk=new Ur,Tk=()=>{const{iFrameLoaded:e}=Ss();H.useEffect(()=>{e({payload:{message:"Layout Editor is loaded"}})},[]);const[t,n]=H.useState(),[r,o]=H.useState(!1);return Pa("getLayoutSaveState",lr,(i,a)=>{let l;a!=null&&a.history&&(l={hash:a.hash,history:ff(a.history)}),wk.logData("LAYOUT_SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"layoutSaveState received"}})}),{layoutSaveState:t,layoutSaveStateFetched:r}},Nk="SITE_",Sk="THEME_",Ok=new Ur,Dw=e=>{const t=H.useCallback(()=>e!=null&&e.themeEntityId?Ak(e.isDevMode,e.siteId,e.themeEntityId):"",[e]);return{clearThemeLocalStorage:()=>{Ok.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(t())},buildThemeLocalStorageKey:t}};function Ak(e,t,n){if(!n)throw new Error("Unable to generate local storage key for themes, missing themeEntityId");return(e?"dev":"")+Nk+t+Sk+n}const hi=new Ur,Rk=e=>{const{puckConfig:t,templateMetadata:n,layoutData:r,themeData:o,themeConfig:i}=e,{saveLayoutSaveState:a,publishLayout:l,deleteLayoutSaveState:u}=Ck(),{sendDevLayoutSaveStateData:p,sendDevThemeSaveStateData:m}=Ss(),{layoutSaveState:b,layoutSaveStateFetched:C}=Tk(),{buildVisualConfigLocalStorageKey:_,clearVisualConfigLocalStorage:y}=$w(n),{buildThemeLocalStorageKey:v}=Dw(n),[T,O]=H.useState(),[R,k]=H.useState(!1),P=()=>{hi.logFunc("clearHistory"),y(),u()};H.useEffect(()=>{if(!i)return;const oe=window.localStorage.getItem(v());if(n.isDevMode&&oe){const Z=JSON.parse(oe);if(Z.length>0){const K=Z[Z.length-1].data;hi.log("Layout Dev Mode - Using theme data from local storage"),m({payload:{devThemeSaveStateData:JSON.stringify(K)}}),Ru(K,i);return}}o&&Ru(o,i)},[o,i,n]);const M=H.useCallback(()=>{if(!n)return;if(hi.logFunc("loadPuckInitialHistory"),n.isDevMode&&!n.devOverride){const K=window.localStorage.getItem(_());if(K){hi.log("Layout Dev Mode - Using layout data from localStorage");const Q=JSON.parse(K),de=Q.length-1;O({histories:Q,index:de,appendData:!1}),k(!0);return}hi.log("Layout Dev Mode - No localStorage. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}if(!b){y(),hi.log("Layout Prod Mode - No saveState. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}const oe=window.localStorage.getItem(_());if(!oe){hi.log("Layout Prod Mode - No localStorage. Using layout saveState"),O({histories:r?[{id:"root",state:{data:r}},{id:b.hash,state:{data:b.history.data}}]:[{id:b.hash,state:{data:b.history.data}}],index:r?1:0,appendData:!1}),k(!0);return}const Z=JSON.parse(oe).findIndex(K=>K.id===(b==null?void 0:b.hash));if(Z!==-1){hi.log("Layout Prod Mode - Using localStorage visual configuration"),O({histories:JSON.parse(oe),index:Z,appendData:!1}),k(!0);return}y()},[O,k,y,_]);H.useEffect(()=>{C&&M()},[n,C]),H.useEffect(()=>{T&&hi.logData("PUCK_INITIAL_HISTORY",T)},[T]),H.useEffect(()=>{if(!R)return;const oe=T==null?void 0:T.histories[T.histories.length-1].state.data;hi.logFunc("sendDevSaveStateData useEffect"),p({payload:{devSaveStateData:JSON.stringify(oe)}})},[R,T,n]);const Y=!R||!C,X=60+(R+C)*20;return Y?te.jsx(Bg,{progress:X}):te.jsx(yk,{puckConfig:t,puckInitialHistory:T,isLoading:Y,clearHistory:P,templateMetadata:n,layoutSaveState:b,saveLayoutSaveState:a,publishLayout:l,sendDevSaveStateData:p,buildVisualConfigLocalStorageKey:_})},$k=Tr("ve-relative ve-rounded ve-border ve-mx-4 ve-my-3 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Xp=H.forwardRef(({className:e,variant:t,...n},r)=>te.jsx("div",{ref:r,role:"alert",className:cr($k({variant:t}),e),...n}));Xp.displayName="Alert";const Dk=H.forwardRef(({className:e,...t},n)=>te.jsx("h5",{ref:n,className:cr("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));Dk.displayName="AlertTitle";const Qp=H.forwardRef(({className:e,...t},n)=>te.jsx("div",{ref:n,className:cr("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));Qp.displayName="AlertDescription";var Eo={},Wu={},kk=typeof $d=="object"&&$d&&$d.Object===Object&&$d,kw=kk,Mk=kw,Pk=typeof self=="object"&&self&&self.Object===Object&&self,Ik=Mk||Pk||Function("return this")(),Ni=Ik,Lk=Ni,Fk=Lk.Symbol,zu=Fk,Tv=zu,Mw=Object.prototype,jk=Mw.hasOwnProperty,Bk=Mw.toString,uu=Tv?Tv.toStringTag:void 0;function Wk(e){var t=jk.call(e,uu),n=e[uu];try{e[uu]=void 0;var r=!0}catch{}var o=Bk.call(e);return r&&(t?e[uu]=n:delete e[uu]),o}var zk=Wk,Hk=Object.prototype,Gk=Hk.toString;function Vk(e){return Gk.call(e)}var Kk=Vk,Nv=zu,Uk=zk,Yk=Kk,qk="[object Null]",Zk="[object Undefined]",Sv=Nv?Nv.toStringTag:void 0;function Jk(e){return e==null?e===void 0?Zk:qk:Sv&&Sv in Object(e)?Uk(e):Yk(e)}var Os=Jk,Xk=Array.isArray,Jo=Xk;function Qk(e){return e!=null&&typeof e=="object"}var na=Qk,eM=Os,tM=Jo,nM=na,rM="[object String]";function oM(e){return typeof e=="string"||!tM(e)&&nM(e)&&eM(e)==rM}var iM=oM;function aM(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(n(i[u],u,i)===!1)break}return t}}var sM=aM,lM=sM,cM=lM(),uM=cM;function dM(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fM=dM,hM=Os,pM=na,gM="[object Arguments]";function mM(e){return pM(e)&&hM(e)==gM}var yM=mM,Ov=yM,vM=na,Pw=Object.prototype,bM=Pw.hasOwnProperty,_M=Pw.propertyIsEnumerable,xM=Ov(function(){return arguments}())?Ov:function(e){return vM(e)&&bM.call(e,"callee")&&!_M.call(e,"callee")},Iw=xM,vf={exports:{}};function EM(){return!1}var CM=EM;vf.exports;(function(e,t){var n=Ni,r=CM,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,p=u||r;e.exports=p})(vf,vf.exports);var sm=vf.exports,wM=9007199254740991,TM=/^(?:0|[1-9]\d*)$/;function NM(e,t){var n=typeof e;return t=t??wM,!!t&&(n=="number"||n!="symbol"&&TM.test(e))&&e>-1&&e%1==0&&e<t}var Lw=NM,SM=9007199254740991;function OM(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SM}var lm=OM,AM=Os,RM=lm,$M=na,DM="[object Arguments]",kM="[object Array]",MM="[object Boolean]",PM="[object Date]",IM="[object Error]",LM="[object Function]",FM="[object Map]",jM="[object Number]",BM="[object Object]",WM="[object RegExp]",zM="[object Set]",HM="[object String]",GM="[object WeakMap]",VM="[object ArrayBuffer]",KM="[object DataView]",UM="[object Float32Array]",YM="[object Float64Array]",qM="[object Int8Array]",ZM="[object Int16Array]",JM="[object Int32Array]",XM="[object Uint8Array]",QM="[object Uint8ClampedArray]",eP="[object Uint16Array]",tP="[object Uint32Array]",Tn={};Tn[UM]=Tn[YM]=Tn[qM]=Tn[ZM]=Tn[JM]=Tn[XM]=Tn[QM]=Tn[eP]=Tn[tP]=!0;Tn[DM]=Tn[kM]=Tn[VM]=Tn[MM]=Tn[KM]=Tn[PM]=Tn[IM]=Tn[LM]=Tn[FM]=Tn[jM]=Tn[BM]=Tn[WM]=Tn[zM]=Tn[HM]=Tn[GM]=!1;function nP(e){return $M(e)&&RM(e.length)&&!!Tn[AM(e)]}var rP=nP;function oP(e){return function(t){return e(t)}}var cm=oP,bf={exports:{}};bf.exports;(function(e,t){var n=kw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(bf,bf.exports);var um=bf.exports,iP=rP,aP=cm,Av=um,Rv=Av&&Av.isTypedArray,sP=Rv?aP(Rv):iP,Fw=sP,lP=fM,cP=Iw,uP=Jo,dP=sm,fP=Lw,hP=Fw,pP=Object.prototype,gP=pP.hasOwnProperty;function mP(e,t){var n=uP(e),r=!n&&cP(e),o=!n&&!r&&dP(e),i=!n&&!r&&!o&&hP(e),a=n||r||o||i,l=a?lP(e.length,String):[],u=l.length;for(var p in e)(t||gP.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||fP(p,u)))&&l.push(p);return l}var jw=mP,yP=Object.prototype;function vP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yP;return e===n}var dm=vP;function bP(e,t){return function(n){return e(t(n))}}var Bw=bP,_P=Bw,xP=_P(Object.keys,Object),EP=xP,CP=dm,wP=EP,TP=Object.prototype,NP=TP.hasOwnProperty;function SP(e){if(!CP(e))return wP(e);var t=[];for(var n in Object(e))NP.call(e,n)&&n!="constructor"&&t.push(n);return t}var OP=SP;function AP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ic=AP,RP=Os,$P=ic,DP="[object AsyncFunction]",kP="[object Function]",MP="[object GeneratorFunction]",PP="[object Proxy]";function IP(e){if(!$P(e))return!1;var t=RP(e);return t==kP||t==MP||t==DP||t==PP}var Ww=IP,LP=Ww,FP=lm;function jP(e){return e!=null&&FP(e.length)&&!LP(e)}var zf=jP,BP=jw,WP=OP,zP=zf;function HP(e){return zP(e)?BP(e):WP(e)}var Hu=HP,GP=uM,VP=Hu;function KP(e,t){return e&&GP(e,t,VP)}var zw=KP;function UP(e){return e}var Hw=UP,YP=Hw;function qP(e){return typeof e=="function"?e:YP}var ZP=qP,JP=zw,XP=ZP;function QP(e,t){return e&&JP(e,XP(t))}var fm=QP,eI=Bw,tI=eI(Object.getPrototypeOf,Object),hm=tI,nI=Os,rI=hm,oI=na,iI="[object Object]",aI=Function.prototype,sI=Object.prototype,Gw=aI.toString,lI=sI.hasOwnProperty,cI=Gw.call(Object);function uI(e){if(!oI(e)||nI(e)!=iI)return!1;var t=rI(e);if(t===null)return!0;var n=lI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gw.call(n)==cI}var dI=uI;function fI(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Vw=fI;function hI(){this.__data__=[],this.size=0}var pI=hI;function gI(e,t){return e===t||e!==e&&t!==t}var pm=gI,mI=pm;function yI(e,t){for(var n=e.length;n--;)if(mI(e[n][0],t))return n;return-1}var Hf=yI,vI=Hf,bI=Array.prototype,_I=bI.splice;function xI(e){var t=this.__data__,n=vI(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():_I.call(t,n,1),--this.size,!0}var EI=xI,CI=Hf;function wI(e){var t=this.__data__,n=CI(t,e);return n<0?void 0:t[n][1]}var TI=wI,NI=Hf;function SI(e){return NI(this.__data__,e)>-1}var OI=SI,AI=Hf;function RI(e,t){var n=this.__data__,r=AI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var $I=RI,DI=pI,kI=EI,MI=TI,PI=OI,II=$I;function ac(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ac.prototype.clear=DI;ac.prototype.delete=kI;ac.prototype.get=MI;ac.prototype.has=PI;ac.prototype.set=II;var Gf=ac,LI=Gf;function FI(){this.__data__=new LI,this.size=0}var jI=FI;function BI(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var WI=BI;function zI(e){return this.__data__.get(e)}var HI=zI;function GI(e){return this.__data__.has(e)}var VI=GI,KI=Ni,UI=KI["__core-js_shared__"],YI=UI,Vh=YI,$v=function(){var e=/[^.]+$/.exec(Vh&&Vh.keys&&Vh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qI(e){return!!$v&&$v in e}var ZI=qI,JI=Function.prototype,XI=JI.toString;function QI(e){if(e!=null){try{return XI.call(e)}catch{}try{return e+""}catch{}}return""}var Kw=QI,eL=Ww,tL=ZI,nL=ic,rL=Kw,oL=/[\\^$.*+?()[\]{}|]/g,iL=/^\[object .+?Constructor\]$/,aL=Function.prototype,sL=Object.prototype,lL=aL.toString,cL=sL.hasOwnProperty,uL=RegExp("^"+lL.call(cL).replace(oL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dL(e){if(!nL(e)||tL(e))return!1;var t=eL(e)?uL:iL;return t.test(rL(e))}var fL=dL;function hL(e,t){return e==null?void 0:e[t]}var pL=hL,gL=fL,mL=pL;function yL(e,t){var n=mL(e,t);return gL(n)?n:void 0}var As=yL,vL=As,bL=Ni,_L=vL(bL,"Map"),gm=_L,xL=As,EL=xL(Object,"create"),Vf=EL,Dv=Vf;function CL(){this.__data__=Dv?Dv(null):{},this.size=0}var wL=CL;function TL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var NL=TL,SL=Vf,OL="__lodash_hash_undefined__",AL=Object.prototype,RL=AL.hasOwnProperty;function $L(e){var t=this.__data__;if(SL){var n=t[e];return n===OL?void 0:n}return RL.call(t,e)?t[e]:void 0}var DL=$L,kL=Vf,ML=Object.prototype,PL=ML.hasOwnProperty;function IL(e){var t=this.__data__;return kL?t[e]!==void 0:PL.call(t,e)}var LL=IL,FL=Vf,jL="__lodash_hash_undefined__";function BL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=FL&&t===void 0?jL:t,this}var WL=BL,zL=wL,HL=NL,GL=DL,VL=LL,KL=WL;function sc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sc.prototype.clear=zL;sc.prototype.delete=HL;sc.prototype.get=GL;sc.prototype.has=VL;sc.prototype.set=KL;var UL=sc,kv=UL,YL=Gf,qL=gm;function ZL(){this.size=0,this.__data__={hash:new kv,map:new(qL||YL),string:new kv}}var JL=ZL;function XL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var QL=XL,eF=QL;function tF(e,t){var n=e.__data__;return eF(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Kf=tF,nF=Kf;function rF(e){var t=nF(this,e).delete(e);return this.size-=t?1:0,t}var oF=rF,iF=Kf;function aF(e){return iF(this,e).get(e)}var sF=aF,lF=Kf;function cF(e){return lF(this,e).has(e)}var uF=cF,dF=Kf;function fF(e,t){var n=dF(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var hF=fF,pF=JL,gF=oF,mF=sF,yF=uF,vF=hF;function lc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lc.prototype.clear=pF;lc.prototype.delete=gF;lc.prototype.get=mF;lc.prototype.has=yF;lc.prototype.set=vF;var mm=lc,bF=Gf,_F=gm,xF=mm,EF=200;function CF(e,t){var n=this.__data__;if(n instanceof bF){var r=n.__data__;if(!_F||r.length<EF-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xF(r)}return n.set(e,t),this.size=n.size,this}var wF=CF,TF=Gf,NF=jI,SF=WI,OF=HI,AF=VI,RF=wF;function cc(e){var t=this.__data__=new TF(e);this.size=t.size}cc.prototype.clear=NF;cc.prototype.delete=SF;cc.prototype.get=OF;cc.prototype.has=AF;cc.prototype.set=RF;var ym=cc,$F="__lodash_hash_undefined__";function DF(e){return this.__data__.set(e,$F),this}var kF=DF;function MF(e){return this.__data__.has(e)}var PF=MF,IF=mm,LF=kF,FF=PF;function _f(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new IF;++t<n;)this.add(e[t])}_f.prototype.add=_f.prototype.push=LF;_f.prototype.has=FF;var jF=_f;function BF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var WF=BF;function zF(e,t){return e.has(t)}var HF=zF,GF=jF,VF=WF,KF=HF,UF=1,YF=2;function qF(e,t,n,r,o,i){var a=n&UF,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var b=-1,C=!0,_=n&YF?new GF:void 0;for(i.set(e,t),i.set(t,e);++b<l;){var y=e[b],v=t[b];if(r)var T=a?r(v,y,b,t,e,i):r(y,v,b,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(_){if(!VF(t,function(O,R){if(!KF(_,R)&&(y===O||o(y,O,n,r,i)))return _.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}var Uw=qF,ZF=Ni,JF=ZF.Uint8Array,Yw=JF;function XF(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var QF=XF;function e2(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var t2=e2,Mv=zu,Pv=Yw,n2=pm,r2=Uw,o2=QF,i2=t2,a2=1,s2=2,l2="[object Boolean]",c2="[object Date]",u2="[object Error]",d2="[object Map]",f2="[object Number]",h2="[object RegExp]",p2="[object Set]",g2="[object String]",m2="[object Symbol]",y2="[object ArrayBuffer]",v2="[object DataView]",Iv=Mv?Mv.prototype:void 0,Kh=Iv?Iv.valueOf:void 0;function b2(e,t,n,r,o,i,a){switch(n){case v2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y2:return!(e.byteLength!=t.byteLength||!i(new Pv(e),new Pv(t)));case l2:case c2:case f2:return n2(+e,+t);case u2:return e.name==t.name&&e.message==t.message;case h2:case g2:return e==t+"";case d2:var l=o2;case p2:var u=r&a2;if(l||(l=i2),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=s2,a.set(e,t);var m=r2(l(e),l(t),r,o,i,a);return a.delete(e),m;case m2:if(Kh)return Kh.call(e)==Kh.call(t)}return!1}var _2=b2;function x2(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var qw=x2,E2=qw,C2=Jo;function w2(e,t,n){var r=t(e);return C2(e)?r:E2(r,n(e))}var Zw=w2;function T2(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var N2=T2;function S2(){return[]}var Jw=S2,O2=N2,A2=Jw,R2=Object.prototype,$2=R2.propertyIsEnumerable,Lv=Object.getOwnPropertySymbols,D2=Lv?function(e){return e==null?[]:(e=Object(e),O2(Lv(e),function(t){return $2.call(e,t)}))}:A2,vm=D2,k2=Zw,M2=vm,P2=Hu;function I2(e){return k2(e,P2,M2)}var Xw=I2,Fv=Xw,L2=1,F2=Object.prototype,j2=F2.hasOwnProperty;function B2(e,t,n,r,o,i){var a=n&L2,l=Fv(e),u=l.length,p=Fv(t),m=p.length;if(u!=m&&!a)return!1;for(var b=u;b--;){var C=l[b];if(!(a?C in t:j2.call(t,C)))return!1}var _=i.get(e),y=i.get(t);if(_&&y)return _==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++b<u;){C=l[b];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var W2=B2,z2=As,H2=Ni,G2=z2(H2,"DataView"),V2=G2,K2=As,U2=Ni,Y2=K2(U2,"Promise"),q2=Y2,Z2=As,J2=Ni,X2=Z2(J2,"Set"),Q2=X2,ej=As,tj=Ni,nj=ej(tj,"WeakMap"),rj=nj,eg=V2,tg=gm,ng=q2,rg=Q2,og=rj,Qw=Os,uc=Kw,jv="[object Map]",oj="[object Object]",Bv="[object Promise]",Wv="[object Set]",zv="[object WeakMap]",Hv="[object DataView]",ij=uc(eg),aj=uc(tg),sj=uc(ng),lj=uc(rg),cj=uc(og),ms=Qw;(eg&&ms(new eg(new ArrayBuffer(1)))!=Hv||tg&&ms(new tg)!=jv||ng&&ms(ng.resolve())!=Bv||rg&&ms(new rg)!=Wv||og&&ms(new og)!=zv)&&(ms=function(e){var t=Qw(e),n=t==oj?e.constructor:void 0,r=n?uc(n):"";if(r)switch(r){case ij:return Hv;case aj:return jv;case sj:return Bv;case lj:return Wv;case cj:return zv}return t});var Uf=ms,Uh=ym,uj=Uw,dj=_2,fj=W2,Gv=Uf,Vv=Jo,Kv=sm,hj=Fw,pj=1,Uv="[object Arguments]",Yv="[object Array]",jd="[object Object]",gj=Object.prototype,qv=gj.hasOwnProperty;function mj(e,t,n,r,o,i){var a=Vv(e),l=Vv(t),u=a?Yv:Gv(e),p=l?Yv:Gv(t);u=u==Uv?jd:u,p=p==Uv?jd:p;var m=u==jd,b=p==jd,C=u==p;if(C&&Kv(e)){if(!Kv(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new Uh),a||hj(e)?uj(e,t,n,r,o,i):dj(e,t,u,n,r,o,i);if(!(n&pj)){var _=m&&qv.call(e,"__wrapped__"),y=b&&qv.call(t,"__wrapped__");if(_||y){var v=_?e.value():e,T=y?t.value():t;return i||(i=new Uh),o(v,T,n,r,i)}}return C?(i||(i=new Uh),fj(e,t,n,r,o,i)):!1}var yj=mj,vj=yj,Zv=na;function eT(e,t,n,r,o){return e===t?!0:e==null||t==null||!Zv(e)&&!Zv(t)?e!==e&&t!==t:vj(e,t,n,r,eT,o)}var tT=eT,bj=ym,_j=tT,xj=1,Ej=2;function Cj(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){l=n[o];var u=l[0],p=e[u],m=l[1];if(a&&l[2]){if(p===void 0&&!(u in e))return!1}else{var b=new bj;if(r)var C=r(p,m,u,e,t,b);if(!(C===void 0?_j(m,p,xj|Ej,r,b):C))return!1}}return!0}var wj=Cj,Tj=ic;function Nj(e){return e===e&&!Tj(e)}var nT=Nj,Sj=nT,Oj=Hu;function Aj(e){for(var t=Oj(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Sj(o)]}return t}var Rj=Aj;function $j(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var rT=$j,Dj=wj,kj=Rj,Mj=rT;function Pj(e){var t=kj(e);return t.length==1&&t[0][2]?Mj(t[0][0],t[0][1]):function(n){return n===e||Dj(n,e,t)}}var Ij=Pj,Lj=Os,Fj=na,jj="[object Symbol]";function Bj(e){return typeof e=="symbol"||Fj(e)&&Lj(e)==jj}var bm=Bj,Wj=Jo,zj=bm,Hj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gj=/^\w*$/;function Vj(e,t){if(Wj(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||zj(e)?!0:Gj.test(e)||!Hj.test(e)||t!=null&&e in Object(t)}var _m=Vj,oT=mm,Kj="Expected a function";function xm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Kj);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(xm.Cache||oT),n}xm.Cache=oT;var Uj=xm,Yj=Uj,qj=500;function Zj(e){var t=Yj(e,function(r){return n.size===qj&&n.clear(),r}),n=t.cache;return t}var Jj=Zj,Xj=Jj,Qj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eB=/\\(\\)?/g,tB=Xj(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qj,function(n,r,o,i){t.push(o?i.replace(eB,"$1"):r||n)}),t}),nB=tB,Jv=zu,rB=Vw,oB=Jo,iB=bm,aB=1/0,Xv=Jv?Jv.prototype:void 0,Qv=Xv?Xv.toString:void 0;function iT(e){if(typeof e=="string")return e;if(oB(e))return rB(e,iT)+"";if(iB(e))return Qv?Qv.call(e):"";var t=e+"";return t=="0"&&1/e==-aB?"-0":t}var sB=iT,lB=sB;function cB(e){return e==null?"":lB(e)}var uB=cB,dB=Jo,fB=_m,hB=nB,pB=uB;function gB(e,t){return dB(e)?e:fB(e,t)?[e]:hB(pB(e))}var aT=gB,mB=bm,yB=1/0;function vB(e){if(typeof e=="string"||mB(e))return e;var t=e+"";return t=="0"&&1/e==-yB?"-0":t}var Yf=vB,bB=aT,_B=Yf;function xB(e,t){t=bB(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[_B(t[n++])];return n&&n==r?e:void 0}var sT=xB,EB=sT;function CB(e,t,n){var r=e==null?void 0:EB(e,t);return r===void 0?n:r}var wB=CB;function TB(e,t){return e!=null&&t in Object(e)}var NB=TB,SB=aT,OB=Iw,AB=Jo,RB=Lw,$B=lm,DB=Yf;function kB(e,t,n){t=SB(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=DB(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&$B(o)&&RB(a,o)&&(AB(e)||OB(e)))}var MB=kB,PB=NB,IB=MB;function LB(e,t){return e!=null&&IB(e,t,PB)}var FB=LB,jB=tT,BB=wB,WB=FB,zB=_m,HB=nT,GB=rT,VB=Yf,KB=1,UB=2;function YB(e,t){return zB(e)&&HB(t)?GB(VB(e),t):function(n){var r=BB(n,e);return r===void 0&&r===t?WB(n,e):jB(t,r,KB|UB)}}var qB=YB;function ZB(e){return function(t){return t==null?void 0:t[e]}}var JB=ZB,XB=sT;function QB(e){return function(t){return XB(t,e)}}var eW=QB,tW=JB,nW=eW,rW=_m,oW=Yf;function iW(e){return rW(e)?tW(oW(e)):nW(e)}var aW=iW,sW=Ij,lW=qB,cW=Hw,uW=Jo,dW=aW;function fW(e){return typeof e=="function"?e:e==null?cW:typeof e=="object"?uW(e)?lW(e[0],e[1]):sW(e):dW(e)}var hW=fW,pW=zf;function gW(e,t){return function(n,r){if(n==null)return n;if(!pW(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var mW=gW,yW=zw,vW=mW,bW=vW(yW),_W=bW,xW=_W,EW=zf;function CW(e,t){var n=-1,r=EW(e)?Array(e.length):[];return xW(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var wW=CW,TW=Vw,NW=hW,SW=wW,OW=Jo;function AW(e,t){var n=OW(e)?TW:SW;return n(e,NW(t))}var RW=AW;Object.defineProperty(Wu,"__esModule",{value:!0});Wu.flattenNames=void 0;var $W=iM,DW=qf($W),kW=fm,MW=qf(kW),PW=dI,IW=qf(PW),LW=RW,FW=qf(LW);function qf(e){return e&&e.__esModule?e:{default:e}}var jW=Wu.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,FW.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,IW.default)(r)?(0,MW.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,DW.default)(r)&&n.push(r)}),n};Wu.default=jW;var Gu={};function BW(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var WW=BW,zW=As,HW=function(){try{var e=zW(Object,"defineProperty");return e({},"",{}),e}catch{}}(),GW=HW,e0=GW;function VW(e,t,n){t=="__proto__"&&e0?e0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var lT=VW,KW=lT,UW=pm,YW=Object.prototype,qW=YW.hasOwnProperty;function ZW(e,t,n){var r=e[t];(!(qW.call(e,t)&&UW(r,n))||n===void 0&&!(t in e))&&KW(e,t,n)}var cT=ZW,JW=cT,XW=lT;function QW(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=r?r(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),o?XW(n,l,u):JW(n,l,u)}return n}var Zf=QW,ez=Zf,tz=Hu;function nz(e,t){return e&&ez(t,tz(t),e)}var rz=nz;function oz(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var iz=oz,az=ic,sz=dm,lz=iz,cz=Object.prototype,uz=cz.hasOwnProperty;function dz(e){if(!az(e))return lz(e);var t=sz(e),n=[];for(var r in e)r=="constructor"&&(t||!uz.call(e,r))||n.push(r);return n}var fz=dz,hz=jw,pz=fz,gz=zf;function mz(e){return gz(e)?hz(e,!0):pz(e)}var Em=mz,yz=Zf,vz=Em;function bz(e,t){return e&&yz(t,vz(t),e)}var _z=bz,xf={exports:{}};xf.exports;(function(e,t){var n=Ni,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(p,m){if(m)return p.slice();var b=p.length,C=l?l(b):new p.constructor(b);return p.copy(C),C}e.exports=u})(xf,xf.exports);var xz=xf.exports;function Ez(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Cz=Ez,wz=Zf,Tz=vm;function Nz(e,t){return wz(e,Tz(e),t)}var Sz=Nz,Oz=qw,Az=hm,Rz=vm,$z=Jw,Dz=Object.getOwnPropertySymbols,kz=Dz?function(e){for(var t=[];e;)Oz(t,Rz(e)),e=Az(e);return t}:$z,uT=kz,Mz=Zf,Pz=uT;function Iz(e,t){return Mz(e,Pz(e),t)}var Lz=Iz,Fz=Zw,jz=uT,Bz=Em;function Wz(e){return Fz(e,Bz,jz)}var zz=Wz,Hz=Object.prototype,Gz=Hz.hasOwnProperty;function Vz(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Gz.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Kz=Vz,t0=Yw;function Uz(e){var t=new e.constructor(e.byteLength);return new t0(t).set(new t0(e)),t}var Cm=Uz,Yz=Cm;function qz(e,t){var n=t?Yz(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Zz=qz,Jz=/\w*$/;function Xz(e){var t=new e.constructor(e.source,Jz.exec(e));return t.lastIndex=e.lastIndex,t}var Qz=Xz,n0=zu,r0=n0?n0.prototype:void 0,o0=r0?r0.valueOf:void 0;function e3(e){return o0?Object(o0.call(e)):{}}var t3=e3,n3=Cm;function r3(e,t){var n=t?n3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var o3=r3,i3=Cm,a3=Zz,s3=Qz,l3=t3,c3=o3,u3="[object Boolean]",d3="[object Date]",f3="[object Map]",h3="[object Number]",p3="[object RegExp]",g3="[object Set]",m3="[object String]",y3="[object Symbol]",v3="[object ArrayBuffer]",b3="[object DataView]",_3="[object Float32Array]",x3="[object Float64Array]",E3="[object Int8Array]",C3="[object Int16Array]",w3="[object Int32Array]",T3="[object Uint8Array]",N3="[object Uint8ClampedArray]",S3="[object Uint16Array]",O3="[object Uint32Array]";function A3(e,t,n){var r=e.constructor;switch(t){case v3:return i3(e);case u3:case d3:return new r(+e);case b3:return a3(e,n);case _3:case x3:case E3:case C3:case w3:case T3:case N3:case S3:case O3:return c3(e,n);case f3:return new r;case h3:case m3:return new r(e);case p3:return s3(e);case g3:return new r;case y3:return l3(e)}}var R3=A3,$3=ic,i0=Object.create,D3=function(){function e(){}return function(t){if(!$3(t))return{};if(i0)return i0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),k3=D3,M3=k3,P3=hm,I3=dm;function L3(e){return typeof e.constructor=="function"&&!I3(e)?M3(P3(e)):{}}var F3=L3,j3=Uf,B3=na,W3="[object Map]";function z3(e){return B3(e)&&j3(e)==W3}var H3=z3,G3=H3,V3=cm,a0=um,s0=a0&&a0.isMap,K3=s0?V3(s0):G3,U3=K3,Y3=Uf,q3=na,Z3="[object Set]";function J3(e){return q3(e)&&Y3(e)==Z3}var X3=J3,Q3=X3,e5=cm,l0=um,c0=l0&&l0.isSet,t5=c0?e5(c0):Q3,n5=t5,r5=ym,o5=WW,i5=cT,a5=rz,s5=_z,l5=xz,c5=Cz,u5=Sz,d5=Lz,f5=Xw,h5=zz,p5=Uf,g5=Kz,m5=R3,y5=F3,v5=Jo,b5=sm,_5=U3,x5=ic,E5=n5,C5=Hu,w5=Em,T5=1,N5=2,S5=4,dT="[object Arguments]",O5="[object Array]",A5="[object Boolean]",R5="[object Date]",$5="[object Error]",fT="[object Function]",D5="[object GeneratorFunction]",k5="[object Map]",M5="[object Number]",hT="[object Object]",P5="[object RegExp]",I5="[object Set]",L5="[object String]",F5="[object Symbol]",j5="[object WeakMap]",B5="[object ArrayBuffer]",W5="[object DataView]",z5="[object Float32Array]",H5="[object Float64Array]",G5="[object Int8Array]",V5="[object Int16Array]",K5="[object Int32Array]",U5="[object Uint8Array]",Y5="[object Uint8ClampedArray]",q5="[object Uint16Array]",Z5="[object Uint32Array]",En={};En[dT]=En[O5]=En[B5]=En[W5]=En[A5]=En[R5]=En[z5]=En[H5]=En[G5]=En[V5]=En[K5]=En[k5]=En[M5]=En[hT]=En[P5]=En[I5]=En[L5]=En[F5]=En[U5]=En[Y5]=En[q5]=En[Z5]=!0;En[$5]=En[fT]=En[j5]=!1;function of(e,t,n,r,o,i){var a,l=t&T5,u=t&N5,p=t&S5;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!x5(e))return e;var m=v5(e);if(m){if(a=g5(e),!l)return c5(e,a)}else{var b=p5(e),C=b==fT||b==D5;if(b5(e))return l5(e,l);if(b==hT||b==dT||C&&!o){if(a=u||C?{}:y5(e),!l)return u?d5(e,s5(a,e)):u5(e,a5(a,e))}else{if(!En[b])return o?e:{};a=m5(e,b,l)}}i||(i=new r5);var _=i.get(e);if(_)return _;i.set(e,a),E5(e)?e.forEach(function(T){a.add(of(T,t,n,T,e,i))}):_5(e)&&e.forEach(function(T,O){a.set(O,of(T,t,n,O,e,i))});var y=p?u?h5:f5:u?w5:C5,v=m?void 0:y(e);return o5(v||e,function(T,O){v&&(O=T,T=e[O]),i5(a,O,of(T,t,n,O,e,i))}),a}var J5=of,X5=J5,Q5=1,eH=4;function tH(e){return X5(e,Q5|eH)}var nH=tH;Object.defineProperty(Gu,"__esModule",{value:!0});Gu.mergeClasses=void 0;var rH=fm,oH=pT(rH),iH=nH,aH=pT(iH),sH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function pT(e){return e&&e.__esModule?e:{default:e}}var lH=Gu.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,aH.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,oH.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=sH({},r[l],i[l])}),o}),r};Gu.default=lH;var Vu={};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.autoprefix=void 0;var cH=fm,u0=dH(cH),uH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function dH(e){return e&&e.__esModule?e:{default:e}}var fH={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},hH=Vu.autoprefix=function(t){var n={};return(0,u0.default)(t,function(r,o){var i={};(0,u0.default)(r,function(a,l){var u=fH[l];u?i=uH({},i,u(a)):i[l]=a}),n[o]=i}),n};Vu.default=hH;var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.hover=void 0;var pH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gH=H,Yh=mH(gH);function mH(e){return e&&e.__esModule?e:{default:e}}function yH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function vH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var bH=Ku.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){vH(o,r);function o(){var i,a,l,u;yH(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=d0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return Yh.default.createElement(n,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},Yh.default.createElement(t,pH({},l.props,l.state)))},a),d0(l,u)}return o}(Yh.default.Component)};Ku.default=bH;var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.active=void 0;var _H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xH=H,qh=EH(xH);function EH(e){return e&&e.__esModule?e:{default:e}}function CH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function wH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var TH=Uu.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){wH(o,r);function o(){var i,a,l,u;CH(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=f0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return qh.default.createElement(n,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},qh.default.createElement(t,_H({},l.props,l.state)))},a),f0(l,u)}return o}(qh.default.Component)};Uu.default=TH;var wm={};Object.defineProperty(wm,"__esModule",{value:!0});var NH=function(t,n){var r={},o=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};wm.default=NH;Object.defineProperty(Eo,"__esModule",{value:!0});Eo.ReactCSS=Eo.loop=Eo.handleActive=Tm=Eo.handleHover=Eo.hover=void 0;var SH=Wu,OH=dc(SH),AH=Gu,RH=dc(AH),$H=Vu,DH=dc($H),kH=Ku,gT=dc(kH),MH=Uu,PH=dc(MH),IH=wm,LH=dc(IH);function dc(e){return e&&e.__esModule?e:{default:e}}Eo.hover=gT.default;var Tm=Eo.handleHover=gT.default;Eo.handleActive=PH.default;Eo.loop=LH.default;var FH=Eo.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(0,OH.default)(r),a=(0,RH.default)(t,i);return(0,DH.default)(a)},zt=Eo.default=FH,jH=function(t,n,r,o,i){var a=i.clientWidth,l=i.clientHeight,u=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,p=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,m=u-(i.getBoundingClientRect().left+window.pageXOffset),b=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var C=void 0;if(b<0?C=0:b>l?C=1:C=Math.round(b*100/l)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var _=void 0;if(m<0?_=0:m>a?_=1:_=Math.round(m*100/a)/100,o!==_)return{h:n.h,s:n.s,l:n.l,a:_,source:"rgb"}}return null},Zh={},BH=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},WH=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Zh[i])return Zh[i];var a=BH(t,n,r,o);return Zh[i]=a,a},h0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fc=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,l=t.boxShadow,u=t.children,p=zt({default:{grid:{borderRadius:a,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+WH(n,r,o,i.canvas)+") center left"}}});return H.isValidElement(u)?H.cloneElement(u,h0({},u.props,{style:h0({},u.props.style,p.grid)})):H.createElement("div",{style:p.grid})};fc.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var zH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function GH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function VH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Nm=function(e){VH(t,e);function t(){var n,r,o,i;GH(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=p0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=jH(p,o.props.hsl,o.props.direction,o.props.a,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),p0(o,i)}return HH(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,i=zt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
159
- rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
160
- rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:zH({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return H.createElement("div",{style:i.alpha},H.createElement("div",{style:i.checkboard},H.createElement(fc,{renderers:this.props.renderers})),H.createElement("div",{style:i.gradient}),H.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("div",{style:i.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:i.slider}))))}}]),t}(H.PureComponent||H.Component),KH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function UH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qH(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function ZH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var JH=1,mT=38,XH=40,QH=[mT,XH],e4=function(t){return QH.indexOf(t)>-1},t4=function(t){return Number(String(t).replace(/%/g,""))},n4=1,en=function(e){ZH(t,e);function t(n){YH(this,t);var r=qH(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=t4(o.target.value);if(!isNaN(i)&&e4(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===mT?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+n4++,r}return KH(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return UH({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||JH}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=zt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return H.createElement("div",{style:o.wrap},H.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?H.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(H.PureComponent||H.Component),r4=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(o.getBoundingClientRect().left+window.pageXOffset),m=u-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var b=void 0;if(m<0)b=359;else if(m>a)b=0;else{var C=-(m*100/a)+100;b=360*C/100}if(r.h!==b)return{h:b,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var _=void 0;if(p<0)_=0;else if(p>i)_=359;else{var y=p*100/i;_=360*y/100}if(r.h!==_)return{h:_,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},o4=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function a4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var hc=function(e){a4(t,e);function t(){var n,r,o,i;i4(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=g0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=r4(p,o.props.direction,o.props.hsl,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),g0(o,i)}return o4(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,i=o===void 0?"horizontal":o,a=zt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return H.createElement("div",{style:a.hue},H.createElement("div",{className:"hue-"+i,style:a.container,ref:function(u){return r.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
161
- .hue-horizontal {
162
- background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
163
- 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
164
- background: -webkit-linear-gradient(to right, #f00 0%, #ff0
165
- 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
166
- }
167
-
168
- .hue-vertical {
169
- background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
170
- #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
171
- background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
172
- #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
173
- }
174
- `),H.createElement("div",{style:a.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:a.slider}))))}}]),t}(H.PureComponent||H.Component),ig={exports:{}},Bd={exports:{}},un={};/** @license React v16.13.1
175
- * react-is.production.min.js
176
- *
177
- * Copyright (c) Facebook, Inc. and its affiliates.
178
- *
179
- * This source code is licensed under the MIT license found in the
180
- * LICENSE file in the root directory of this source tree.
181
- */var m0;function s4(){if(m0)return un;m0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(M){if(typeof M=="object"&&M!==null){var Y=M.$$typeof;switch(Y){case t:switch(M=M.type,M){case u:case p:case r:case i:case o:case b:return M;default:switch(M=M&&M.$$typeof,M){case l:case m:case y:case _:case a:return M;default:return Y}}case n:return Y}}}function P(M){return k(M)===p}return un.AsyncMode=u,un.ConcurrentMode=p,un.ContextConsumer=l,un.ContextProvider=a,un.Element=t,un.ForwardRef=m,un.Fragment=r,un.Lazy=y,un.Memo=_,un.Portal=n,un.Profiler=i,un.StrictMode=o,un.Suspense=b,un.isAsyncMode=function(M){return P(M)||k(M)===u},un.isConcurrentMode=P,un.isContextConsumer=function(M){return k(M)===l},un.isContextProvider=function(M){return k(M)===a},un.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},un.isForwardRef=function(M){return k(M)===m},un.isFragment=function(M){return k(M)===r},un.isLazy=function(M){return k(M)===y},un.isMemo=function(M){return k(M)===_},un.isPortal=function(M){return k(M)===n},un.isProfiler=function(M){return k(M)===i},un.isStrictMode=function(M){return k(M)===o},un.isSuspense=function(M){return k(M)===b},un.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===p||M===i||M===o||M===b||M===C||typeof M=="object"&&M!==null&&(M.$$typeof===y||M.$$typeof===_||M.$$typeof===a||M.$$typeof===l||M.$$typeof===m||M.$$typeof===T||M.$$typeof===O||M.$$typeof===R||M.$$typeof===v)},un.typeOf=k,un}var dn={};/** @license React v16.13.1
182
- * react-is.development.js
183
- *
184
- * Copyright (c) Facebook, Inc. and its affiliates.
185
- *
186
- * This source code is licensed under the MIT license found in the
187
- * LICENSE file in the root directory of this source tree.
188
- */var y0;function l4(){return y0||(y0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(Oe){return typeof Oe=="string"||typeof Oe=="function"||Oe===r||Oe===p||Oe===i||Oe===o||Oe===b||Oe===C||typeof Oe=="object"&&Oe!==null&&(Oe.$$typeof===y||Oe.$$typeof===_||Oe.$$typeof===a||Oe.$$typeof===l||Oe.$$typeof===m||Oe.$$typeof===T||Oe.$$typeof===O||Oe.$$typeof===R||Oe.$$typeof===v)}function P(Oe){if(typeof Oe=="object"&&Oe!==null){var Be=Oe.$$typeof;switch(Be){case t:var ce=Oe.type;switch(ce){case u:case p:case r:case i:case o:case b:return ce;default:var le=ce&&ce.$$typeof;switch(le){case l:case m:case y:case _:case a:return le;default:return Be}}case n:return Be}}}var M=u,Y=p,X=l,oe=a,Z=t,K=m,Q=r,de=y,pe=_,ne=n,fe=i,U=o,j=b,ee=!1;function re(Oe){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Oe)||P(Oe)===u}function B(Oe){return P(Oe)===p}function W(Oe){return P(Oe)===l}function J(Oe){return P(Oe)===a}function F(Oe){return typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===t}function w(Oe){return P(Oe)===m}function N(Oe){return P(Oe)===r}function I(Oe){return P(Oe)===y}function q(Oe){return P(Oe)===_}function ue(Oe){return P(Oe)===n}function he(Oe){return P(Oe)===i}function se(Oe){return P(Oe)===o}function Ce(Oe){return P(Oe)===b}dn.AsyncMode=M,dn.ConcurrentMode=Y,dn.ContextConsumer=X,dn.ContextProvider=oe,dn.Element=Z,dn.ForwardRef=K,dn.Fragment=Q,dn.Lazy=de,dn.Memo=pe,dn.Portal=ne,dn.Profiler=fe,dn.StrictMode=U,dn.Suspense=j,dn.isAsyncMode=re,dn.isConcurrentMode=B,dn.isContextConsumer=W,dn.isContextProvider=J,dn.isElement=F,dn.isForwardRef=w,dn.isFragment=N,dn.isLazy=I,dn.isMemo=q,dn.isPortal=ue,dn.isProfiler=he,dn.isStrictMode=se,dn.isSuspense=Ce,dn.isValidElementType=k,dn.typeOf=P}()),dn}var v0;function yT(){return v0||(v0=1,process.env.NODE_ENV==="production"?Bd.exports=s4():Bd.exports=l4()),Bd.exports}/*
189
- object-assign
190
- (c) Sindre Sorhus
191
- @license MIT
192
- */var Jh,b0;function c4(){if(b0)return Jh;b0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jh=o()?Object.assign:function(i,a){for(var l,u=r(i),p,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var b in l)t.call(l,b)&&(u[b]=l[b]);if(e){p=e(l);for(var C=0;C<p.length;C++)n.call(l,p[C])&&(u[p[C]]=l[p[C]])}}return u},Jh}var Xh,_0;function Sm(){if(_0)return Xh;_0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xh=e,Xh}var Qh,x0;function vT(){return x0||(x0=1,Qh=Function.call.bind(Object.prototype.hasOwnProperty)),Qh}var ep,E0;function u4(){if(E0)return ep;E0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Sm(),n={},r=vT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,u,p){if(process.env.NODE_ENV!=="production"){for(var m in i)if(r(i,m)){var b;try{if(typeof i[m]!="function"){var C=Error((u||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}b=i[m](a,m,u,l,null,t)}catch(y){b=y}if(b&&!(b instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in n)){n[b.message]=!0;var _=p?p():"";e("Failed "+l+" type: "+b.message+(_??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ep=o,ep}var tp,C0;function d4(){if(C0)return tp;C0=1;var e=yT(),t=c4(),n=Sm(),r=vT(),o=u4(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return tp=function(l,u){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(B){var W=B&&(p&&B[p]||B[m]);if(typeof W=="function")return W}var C="<<anonymous>>",_={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:R(),arrayOf:k,element:P(),elementType:M(),instanceOf:Y,node:K(),objectOf:oe,oneOf:X,oneOfType:Z,shape:de,exact:pe};function y(B,W){return B===W?B!==0||1/B===1/W:B!==B&&W!==W}function v(B,W){this.message=B,this.data=W&&typeof W=="object"?W:{},this.stack=""}v.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var W={},J=0;function F(N,I,q,ue,he,se,Ce){if(ue=ue||C,se=se||q,Ce!==n){if(u){var Oe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Oe.name="Invariant Violation",Oe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Be=ue+":"+q;!W[Be]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Be]=!0,J++)}}return I[q]==null?N?I[q]===null?new v("The "+he+" `"+se+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new v("The "+he+" `"+se+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:B(I,q,ue,he,se)}var w=F.bind(null,!1);return w.isRequired=F.bind(null,!0),w}function O(B){function W(J,F,w,N,I,q){var ue=J[F],he=U(ue);if(he!==B){var se=j(ue);return new v("Invalid "+N+" `"+I+"` of type "+("`"+se+"` supplied to `"+w+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(W)}function R(){return T(a)}function k(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var q=J[F];if(!Array.isArray(q)){var ue=U(q);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an array."))}for(var he=0;he<q.length;he++){var se=B(q,he,w,N,I+"["+he+"]",n);if(se instanceof Error)return se}return null}return T(W)}function P(){function B(W,J,F,w,N){var I=W[J];if(!l(I)){var q=U(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return T(B)}function M(){function B(W,J,F,w,N){var I=W[J];if(!e.isValidElementType(I)){var q=U(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return T(B)}function Y(B){function W(J,F,w,N,I){if(!(J[F]instanceof B)){var q=B.name||C,ue=re(J[F]);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected ")+("instance of `"+q+"`."))}return null}return T(W)}function X(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function W(J,F,w,N,I){for(var q=J[F],ue=0;ue<B.length;ue++)if(y(q,B[ue]))return null;var he=JSON.stringify(B,function(Ce,Oe){var Be=j(Oe);return Be==="symbol"?String(Oe):Oe});return new v("Invalid "+N+" `"+I+"` of value `"+String(q)+"` "+("supplied to `"+w+"`, expected one of "+he+"."))}return T(W)}function oe(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var q=J[F],ue=U(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an object."));for(var he in q)if(r(q,he)){var se=B(q,he,w,N,I+"."+he,n);if(se instanceof Error)return se}return null}return T(W)}function Z(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<B.length;W++){var J=B[W];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(J)+" at index "+W+"."),a}function F(w,N,I,q,ue){for(var he=[],se=0;se<B.length;se++){var Ce=B[se],Oe=Ce(w,N,I,q,ue,n);if(Oe==null)return null;Oe.data&&r(Oe.data,"expectedType")&&he.push(Oe.data.expectedType)}var Be=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new v("Invalid "+q+" `"+ue+"` supplied to "+("`"+I+"`"+Be+"."))}return T(F)}function K(){function B(W,J,F,w,N){return ne(W[J])?null:new v("Invalid "+w+" `"+N+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return T(B)}function Q(B,W,J,F,w){return new v((B||"React class")+": "+W+" type `"+J+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function de(B){function W(J,F,w,N,I){var q=J[F],ue=U(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));for(var he in B){var se=B[he];if(typeof se!="function")return Q(w,N,I,he,j(se));var Ce=se(q,he,w,N,I+"."+he,n);if(Ce)return Ce}return null}return T(W)}function pe(B){function W(J,F,w,N,I){var q=J[F],ue=U(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));var he=t({},J[F],B);for(var se in he){var Ce=B[se];if(r(B,se)&&typeof Ce!="function")return Q(w,N,I,se,j(Ce));if(!Ce)return new v("Invalid "+N+" `"+I+"` key `"+se+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(J[F],null," ")+`
193
- Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Oe=Ce(q,se,w,N,I+"."+se,n);if(Oe)return Oe}return null}return T(W)}function ne(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(ne);if(B===null||l(B))return!0;var W=b(B);if(W){var J=W.call(B),F;if(W!==B.entries){for(;!(F=J.next()).done;)if(!ne(F.value))return!1}else for(;!(F=J.next()).done;){var w=F.value;if(w&&!ne(w[1]))return!1}}else return!1;return!0;default:return!1}}function fe(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function U(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":fe(W,B)?"symbol":W}function j(B){if(typeof B>"u"||B===null)return""+B;var W=U(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function ee(B){var W=j(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function re(B){return!B.constructor||!B.constructor.name?C:B.constructor.name}return _.checkPropTypes=o,_.resetWarningCache=o.resetWarningCache,_.PropTypes=_,_},tp}var np,w0;function f4(){if(w0)return np;w0=1;var e=Sm();function t(){}function n(){}return n.resetWarningCache=t,np=function(){function r(a,l,u,p,m,b){if(b!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},np}if(process.env.NODE_ENV!=="production"){var h4=yT(),p4=!0;ig.exports=d4()(h4.isElement,p4)}else ig.exports=f4()();var g4=ig.exports;const ct=BO(g4);function m4(){this.__data__=[],this.size=0}function Yu(e,t){return e===t||e!==e&&t!==t}function Jf(e,t){for(var n=e.length;n--;)if(Yu(e[n][0],t))return n;return-1}var y4=Array.prototype,v4=y4.splice;function b4(e){var t=this.__data__,n=Jf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():v4.call(t,n,1),--this.size,!0}function _4(e){var t=this.__data__,n=Jf(t,e);return n<0?void 0:t[n][1]}function x4(e){return Jf(this.__data__,e)>-1}function E4(e,t){var n=this.__data__,r=Jf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ra(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ra.prototype.clear=m4;ra.prototype.delete=b4;ra.prototype.get=_4;ra.prototype.has=x4;ra.prototype.set=E4;function C4(){this.__data__=new ra,this.size=0}function w4(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function T4(e){return this.__data__.get(e)}function N4(e){return this.__data__.has(e)}var bT=typeof global=="object"&&global&&global.Object===Object&&global,S4=typeof self=="object"&&self&&self.Object===Object&&self,Xo=bT||S4||Function("return this")(),ja=Xo.Symbol,_T=Object.prototype,O4=_T.hasOwnProperty,A4=_T.toString,du=ja?ja.toStringTag:void 0;function R4(e){var t=O4.call(e,du),n=e[du];try{e[du]=void 0;var r=!0}catch{}var o=A4.call(e);return r&&(t?e[du]=n:delete e[du]),o}var $4=Object.prototype,D4=$4.toString;function k4(e){return D4.call(e)}var M4="[object Null]",P4="[object Undefined]",T0=ja?ja.toStringTag:void 0;function Rs(e){return e==null?e===void 0?P4:M4:T0&&T0 in Object(e)?R4(e):k4(e)}function To(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var I4="[object AsyncFunction]",L4="[object Function]",F4="[object GeneratorFunction]",j4="[object Proxy]";function Om(e){if(!To(e))return!1;var t=Rs(e);return t==L4||t==F4||t==I4||t==j4}var rp=Xo["__core-js_shared__"],N0=function(){var e=/[^.]+$/.exec(rp&&rp.keys&&rp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B4(e){return!!N0&&N0 in e}var W4=Function.prototype,z4=W4.toString;function $s(e){if(e!=null){try{return z4.call(e)}catch{}try{return e+""}catch{}}return""}var H4=/[\\^$.*+?()[\]{}|]/g,G4=/^\[object .+?Constructor\]$/,V4=Function.prototype,K4=Object.prototype,U4=V4.toString,Y4=K4.hasOwnProperty,q4=RegExp("^"+U4.call(Y4).replace(H4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z4(e){if(!To(e)||B4(e))return!1;var t=Om(e)?q4:G4;return t.test($s(e))}function J4(e,t){return e==null?void 0:e[t]}function Ds(e,t){var n=J4(e,t);return Z4(n)?n:void 0}var ku=Ds(Xo,"Map"),Mu=Ds(Object,"create");function X4(){this.__data__=Mu?Mu(null):{},this.size=0}function Q4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var e6="__lodash_hash_undefined__",t6=Object.prototype,n6=t6.hasOwnProperty;function r6(e){var t=this.__data__;if(Mu){var n=t[e];return n===e6?void 0:n}return n6.call(t,e)?t[e]:void 0}var o6=Object.prototype,i6=o6.hasOwnProperty;function a6(e){var t=this.__data__;return Mu?t[e]!==void 0:i6.call(t,e)}var s6="__lodash_hash_undefined__";function l6(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Mu&&t===void 0?s6:t,this}function Ts(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ts.prototype.clear=X4;Ts.prototype.delete=Q4;Ts.prototype.get=r6;Ts.prototype.has=a6;Ts.prototype.set=l6;function c6(){this.size=0,this.__data__={hash:new Ts,map:new(ku||ra),string:new Ts}}function u6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xf(e,t){var n=e.__data__;return u6(t)?n[typeof t=="string"?"string":"hash"]:n.map}function d6(e){var t=Xf(this,e).delete(e);return this.size-=t?1:0,t}function f6(e){return Xf(this,e).get(e)}function h6(e){return Xf(this,e).has(e)}function p6(e,t){var n=Xf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function oa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oa.prototype.clear=c6;oa.prototype.delete=d6;oa.prototype.get=f6;oa.prototype.has=h6;oa.prototype.set=p6;var g6=200;function m6(e,t){var n=this.__data__;if(n instanceof ra){var r=n.__data__;if(!ku||r.length<g6-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oa(r)}return n.set(e,t),this.size=n.size,this}function Ei(e){var t=this.__data__=new ra(e);this.size=t.size}Ei.prototype.clear=C4;Ei.prototype.delete=w4;Ei.prototype.get=T4;Ei.prototype.has=N4;Ei.prototype.set=m6;var Ef=function(){try{var e=Ds(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Am(e,t,n){t=="__proto__"&&Ef?Ef(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ag(e,t,n){(n!==void 0&&!Yu(e[t],n)||n===void 0&&!(t in e))&&Am(e,t,n)}function y6(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var xT=y6(),ET=typeof exports=="object"&&exports&&!exports.nodeType&&exports,S0=ET&&typeof module=="object"&&module&&!module.nodeType&&module,v6=S0&&S0.exports===ET,O0=v6?Xo.Buffer:void 0;O0&&O0.allocUnsafe;function b6(e,t){return e.slice()}var Cf=Xo.Uint8Array;function _6(e){var t=new e.constructor(e.byteLength);return new Cf(t).set(new Cf(e)),t}function x6(e,t){var n=_6(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function E6(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var A0=Object.create,C6=function(){function e(){}return function(t){if(!To(t))return{};if(A0)return A0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function CT(e,t){return function(n){return e(t(n))}}var wT=CT(Object.getPrototypeOf,Object),w6=Object.prototype;function Rm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||w6;return e===n}function T6(e){return typeof e.constructor=="function"&&!Rm(e)?C6(wT(e)):{}}function Ba(e){return e!=null&&typeof e=="object"}var N6="[object Arguments]";function R0(e){return Ba(e)&&Rs(e)==N6}var TT=Object.prototype,S6=TT.hasOwnProperty,O6=TT.propertyIsEnumerable,wf=R0(function(){return arguments}())?R0:function(e){return Ba(e)&&S6.call(e,"callee")&&!O6.call(e,"callee")},ho=Array.isArray,A6=9007199254740991;function $m(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A6}function pc(e){return e!=null&&$m(e.length)&&!Om(e)}function R6(e){return Ba(e)&&pc(e)}function $6(){return!1}var NT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$0=NT&&typeof module=="object"&&module&&!module.nodeType&&module,D6=$0&&$0.exports===NT,D0=D6?Xo.Buffer:void 0,k6=D0?D0.isBuffer:void 0,Tf=k6||$6,M6="[object Object]",P6=Function.prototype,I6=Object.prototype,ST=P6.toString,L6=I6.hasOwnProperty,F6=ST.call(Object);function j6(e){if(!Ba(e)||Rs(e)!=M6)return!1;var t=wT(e);if(t===null)return!0;var n=L6.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ST.call(n)==F6}var B6="[object Arguments]",W6="[object Array]",z6="[object Boolean]",H6="[object Date]",G6="[object Error]",V6="[object Function]",K6="[object Map]",U6="[object Number]",Y6="[object Object]",q6="[object RegExp]",Z6="[object Set]",J6="[object String]",X6="[object WeakMap]",Q6="[object ArrayBuffer]",eG="[object DataView]",tG="[object Float32Array]",nG="[object Float64Array]",rG="[object Int8Array]",oG="[object Int16Array]",iG="[object Int32Array]",aG="[object Uint8Array]",sG="[object Uint8ClampedArray]",lG="[object Uint16Array]",cG="[object Uint32Array]",Nn={};Nn[tG]=Nn[nG]=Nn[rG]=Nn[oG]=Nn[iG]=Nn[aG]=Nn[sG]=Nn[lG]=Nn[cG]=!0;Nn[B6]=Nn[W6]=Nn[Q6]=Nn[z6]=Nn[eG]=Nn[H6]=Nn[G6]=Nn[V6]=Nn[K6]=Nn[U6]=Nn[Y6]=Nn[q6]=Nn[Z6]=Nn[J6]=Nn[X6]=!1;function uG(e){return Ba(e)&&$m(e.length)&&!!Nn[Rs(e)]}function dG(e){return function(t){return e(t)}}var OT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Su=OT&&typeof module=="object"&&module&&!module.nodeType&&module,fG=Su&&Su.exports===OT,op=fG&&bT.process,k0=function(){try{var e=Su&&Su.require&&Su.require("util").types;return e||op&&op.binding&&op.binding("util")}catch{}}(),M0=k0&&k0.isTypedArray,Dm=M0?dG(M0):uG;function sg(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var hG=Object.prototype,pG=hG.hasOwnProperty;function gG(e,t,n){var r=e[t];(!(pG.call(e,t)&&Yu(r,n))||n===void 0&&!(t in e))&&Am(e,t,n)}function mG(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),o?Am(n,l,u):gG(n,l,u)}return n}function yG(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vG=9007199254740991,bG=/^(?:0|[1-9]\d*)$/;function km(e,t){var n=typeof e;return t=t??vG,!!t&&(n=="number"||n!="symbol"&&bG.test(e))&&e>-1&&e%1==0&&e<t}var _G=Object.prototype,xG=_G.hasOwnProperty;function AT(e,t){var n=ho(e),r=!n&&wf(e),o=!n&&!r&&Tf(e),i=!n&&!r&&!o&&Dm(e),a=n||r||o||i,l=a?yG(e.length,String):[],u=l.length;for(var p in e)(t||xG.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||km(p,u)))&&l.push(p);return l}function EG(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var CG=Object.prototype,wG=CG.hasOwnProperty;function TG(e){if(!To(e))return EG(e);var t=Rm(e),n=[];for(var r in e)r=="constructor"&&(t||!wG.call(e,r))||n.push(r);return n}function RT(e){return pc(e)?AT(e,!0):TG(e)}function NG(e){return mG(e,RT(e))}function SG(e,t,n,r,o,i,a){var l=sg(e,n),u=sg(t,n),p=a.get(u);if(p){ag(e,n,p);return}var m=i?i(l,u,n+"",e,t,a):void 0,b=m===void 0;if(b){var C=ho(u),_=!C&&Tf(u),y=!C&&!_&&Dm(u);m=u,C||_||y?ho(l)?m=l:R6(l)?m=E6(l):_?(b=!1,m=b6(u)):y?(b=!1,m=x6(u)):m=[]:j6(u)||wf(u)?(m=l,wf(l)?m=NG(l):(!To(l)||Om(l))&&(m=T6(u))):b=!1}b&&(a.set(u,m),o(m,u,r,i,a),a.delete(u)),ag(e,n,m)}function $T(e,t,n,r,o){e!==t&&xT(t,function(i,a){if(o||(o=new Ei),To(i))SG(e,t,a,n,$T,r,o);else{var l=r?r(sg(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),ag(e,a,l)}},RT)}function Qf(e){return e}function OG(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var P0=Math.max;function AG(e,t,n){return t=P0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=P0(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),OG(e,this,l)}}function RG(e){return function(){return e}}var $G=Ef?function(e,t){return Ef(e,"toString",{configurable:!0,enumerable:!1,value:RG(t),writable:!0})}:Qf,DG=800,kG=16,MG=Date.now;function PG(e){var t=0,n=0;return function(){var r=MG(),o=kG-(r-n);if(n=r,o>0){if(++t>=DG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var IG=PG($G);function LG(e,t){return IG(AG(e,t,Qf),e+"")}function FG(e,t,n){if(!To(n))return!1;var r=typeof t;return(r=="number"?pc(n)&&km(t,n.length):r=="string"&&t in n)?Yu(n[t],e):!1}function jG(e){return LG(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&FG(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t})}var qr=jG(function(e,t,n){$T(e,t,n)}),qu=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,l=a===void 0?{}:a,u=zt(qr({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":n===1});return H.createElement("div",{style:u.wrap},H.createElement("div",{style:u.bg}),H.createElement("div",{style:u.content},i))};qu.propTypes={background:ct.string,zDepth:ct.oneOf([0,1,2,3,4,5]),radius:ct.number,styles:ct.object};qu.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var ip=function(){return Xo.Date.now()},BG=/\s/;function WG(e){for(var t=e.length;t--&&BG.test(e.charAt(t)););return t}var zG=/^\s+/;function HG(e){return e&&e.slice(0,WG(e)+1).replace(zG,"")}var GG="[object Symbol]";function eh(e){return typeof e=="symbol"||Ba(e)&&Rs(e)==GG}var I0=NaN,VG=/^[-+]0x[0-9a-f]+$/i,KG=/^0b[01]+$/i,UG=/^0o[0-7]+$/i,YG=parseInt;function L0(e){if(typeof e=="number")return e;if(eh(e))return I0;if(To(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=To(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=HG(e);var n=KG.test(e);return n||UG.test(e)?YG(e.slice(2),n?2:8):VG.test(e)?I0:+e}var qG="Expected a function",ZG=Math.max,JG=Math.min;function DT(e,t,n){var r,o,i,a,l,u,p=0,m=!1,b=!1,C=!0;if(typeof e!="function")throw new TypeError(qG);t=L0(t)||0,To(n)&&(m=!!n.leading,b="maxWait"in n,i=b?ZG(L0(n.maxWait)||0,t):i,C="trailing"in n?!!n.trailing:C);function _(Y){var X=r,oe=o;return r=o=void 0,p=Y,a=e.apply(oe,X),a}function y(Y){return p=Y,l=setTimeout(O,t),m?_(Y):a}function v(Y){var X=Y-u,oe=Y-p,Z=t-X;return b?JG(Z,i-oe):Z}function T(Y){var X=Y-u,oe=Y-p;return u===void 0||X>=t||X<0||b&&oe>=i}function O(){var Y=ip();if(T(Y))return R(Y);l=setTimeout(O,v(Y))}function R(Y){return l=void 0,C&&r?_(Y):(r=o=void 0,a)}function k(){l!==void 0&&clearTimeout(l),p=0,r=u=o=l=void 0}function P(){return l===void 0?a:R(ip())}function M(){var Y=ip(),X=T(Y);if(r=arguments,o=this,u=Y,X){if(l===void 0)return y(u);if(b)return clearTimeout(l),l=setTimeout(O,t),_(u)}return l===void 0&&(l=setTimeout(O,t)),a}return M.cancel=k,M.flush=P,M}var XG="Expected a function";function QG(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(XG);return To(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),DT(e,t,{leading:r,maxWait:t,trailing:o})}var e8=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(r.getBoundingClientRect().left+window.pageXOffset),m=u-(r.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),m<0?m=0:m>a&&(m=a);var b=p/i,C=1-m/a;return{h:n.h,s:b,v:C,a:n.a,source:"hsv"}},t8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function o8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var th=function(e){o8(t,e);function t(n){n8(this,t);var r=r8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,e8(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var i=r.getContainerRenderWindow();i.addEventListener("mousemove",r.handleChange),i.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=QG(function(o,i,a){o(i,a)},50),r}return t8(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},i=o.color,a=o.white,l=o.black,u=o.pointer,p=o.circle,m=zt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
194
- 0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:a,black:l,pointer:u,circle:p}},{custom:!!this.props.style});return H.createElement("div",{style:m.color,ref:function(C){return r.container=C},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
195
- .saturation-white {
196
- background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
197
- background: linear-gradient(to right, #fff, rgba(255,255,255,0));
198
- }
199
- .saturation-black {
200
- background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
201
- background: linear-gradient(to top, #000, rgba(0,0,0,0));
202
- }
203
- `),H.createElement("div",{style:m.white,className:"saturation-white"},H.createElement("div",{style:m.black,className:"saturation-black"}),H.createElement("div",{style:m.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:m.circle}))))}}]),t}(H.PureComponent||H.Component);function i8(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var a8=CT(Object.keys,Object),s8=Object.prototype,l8=s8.hasOwnProperty;function c8(e){if(!Rm(e))return a8(e);var t=[];for(var n in Object(e))l8.call(e,n)&&n!="constructor"&&t.push(n);return t}function Mm(e){return pc(e)?AT(e):c8(e)}function u8(e,t){return e&&xT(e,t,Mm)}function d8(e,t){return function(n,r){if(n==null)return n;if(!pc(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var kT=d8(u8);function f8(e){return typeof e=="function"?e:Qf}function h8(e,t){var n=ho(e)?i8:kT;return n(e,f8(t))}function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}var p8=/^\s+/,g8=/\s+$/;function Ot(e,t){if(e=e||"",t=t||{},e instanceof Ot)return e;if(!(this instanceof Ot))return new Ot(e,t);var n=m8(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Ot.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,i,a,l;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=MT(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=j0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=j0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=F0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=F0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return B0(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return _8(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(kn(this._r,255)*100)+"%",g:Math.round(kn(this._g,255)*100)+"%",b:Math.round(kn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(kn(this._r,255)*100)+"%, "+Math.round(kn(this._g,255)*100)+"%, "+Math.round(kn(this._b,255)*100)+"%)":"rgba("+Math.round(kn(this._r,255)*100)+"%, "+Math.round(kn(this._g,255)*100)+"%, "+Math.round(kn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:D8[B0(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+W0(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=Ot(t);r="#"+W0(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Ot(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w8,arguments)},brighten:function(){return this._applyModification(T8,arguments)},darken:function(){return this._applyModification(N8,arguments)},desaturate:function(){return this._applyModification(x8,arguments)},saturate:function(){return this._applyModification(E8,arguments)},greyscale:function(){return this._applyModification(C8,arguments)},spin:function(){return this._applyModification(S8,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(R8,arguments)},complement:function(){return this._applyCombination(O8,arguments)},monochromatic:function(){return this._applyCombination($8,arguments)},splitcomplement:function(){return this._applyCombination(A8,arguments)},triad:function(){return this._applyCombination(z0,[3])},tetrad:function(){return this._applyCombination(z0,[4])}};Ot.fromRatio=function(e,t){if(Nf(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Cu(e[r]));e=n}return Ot(e,t)};function m8(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=I8(e)),Nf(e)=="object"&&(Vi(e.r)&&Vi(e.g)&&Vi(e.b)?(t=y8(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Vi(e.h)&&Vi(e.s)&&Vi(e.v)?(r=Cu(e.s),o=Cu(e.v),t=b8(e.h,r,o),a=!0,l="hsv"):Vi(e.h)&&Vi(e.s)&&Vi(e.l)&&(r=Cu(e.s),i=Cu(e.l),t=v8(e.h,r,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=MT(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function y8(e,t,n){return{r:kn(e,255)*255,g:kn(t,255)*255,b:kn(n,255)*255}}function F0(e,t,n){e=kn(e,255),t=kn(t,255),n=kn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=(r+o)/2;if(r==o)i=a=0;else{var u=r-o;switch(a=l>.5?u/(2-r-o):u/(r+o),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,l}}function v8(e,t,n){var r,o,i;e=kn(e,360),t=kn(t,100),n=kn(n,100);function a(p,m,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?p+(m-p)*6*b:b<1/2?m:b<2/3?p+(m-p)*(2/3-b)*6:p}if(t===0)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=a(u,l,e+1/3),o=a(u,l,e),i=a(u,l,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function j0(e,t,n){e=kn(e,255),t=kn(t,255),n=kn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=r,u=r-o;if(a=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,v:l}}function b8(e,t,n){e=kn(e,360)*6,t=kn(t,100),n=kn(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),u=r%6,p=[n,a,i,i,l,n][u],m=[l,n,n,a,i,i][u],b=[i,i,l,n,n,a][u];return{r:p*255,g:m*255,b:b*255}}function B0(e,t,n,r){var o=[Go(Math.round(e).toString(16)),Go(Math.round(t).toString(16)),Go(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function _8(e,t,n,r,o){var i=[Go(Math.round(e).toString(16)),Go(Math.round(t).toString(16)),Go(Math.round(n).toString(16)),Go(PT(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function W0(e,t,n,r){var o=[Go(PT(r)),Go(Math.round(e).toString(16)),Go(Math.round(t).toString(16)),Go(Math.round(n).toString(16))];return o.join("")}Ot.equals=function(e,t){return!e||!t?!1:Ot(e).toRgbString()==Ot(t).toRgbString()};Ot.random=function(){return Ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function x8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s-=t/100,n.s=nh(n.s),Ot(n)}function E8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s+=t/100,n.s=nh(n.s),Ot(n)}function C8(e){return Ot(e).desaturate(100)}function w8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l+=t/100,n.l=nh(n.l),Ot(n)}function T8(e,t){t=t===0?0:t||10;var n=Ot(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),Ot(n)}function N8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l-=t/100,n.l=nh(n.l),Ot(n)}function S8(e,t){var n=Ot(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Ot(n)}function O8(e){var t=Ot(e).toHsl();return t.h=(t.h+180)%360,Ot(t)}function z0(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Ot(e).toHsl(),r=[Ot(e)],o=360/t,i=1;i<t;i++)r.push(Ot({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function A8(e){var t=Ot(e).toHsl(),n=t.h;return[Ot(e),Ot({h:(n+72)%360,s:t.s,l:t.l}),Ot({h:(n+216)%360,s:t.s,l:t.l})]}function R8(e,t,n){t=t||6,n=n||30;var r=Ot(e).toHsl(),o=360/n,i=[Ot(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Ot(r));return i}function $8(e,t){t=t||6;for(var n=Ot(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(Ot({h:r,s:o,v:i})),i=(i+l)%1;return a}Ot.mix=function(e,t,n){n=n===0?0:n||50;var r=Ot(e).toRgb(),o=Ot(t).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return Ot(a)};Ot.readability=function(e,t){var n=Ot(e),r=Ot(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};Ot.isReadable=function(e,t,n){var r=Ot.readability(e,t),o,i;switch(i=!1,o=L8(n),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i};Ot.mostReadable=function(e,t,n){var r=null,o=0,i,a,l,u;n=n||{},a=n.includeFallbackColors,l=n.level,u=n.size;for(var p=0;p<t.length;p++)i=Ot.readability(e,t[p]),i>o&&(o=i,r=Ot(t[p]));return Ot.isReadable(e,r,{level:l,size:u})||!a?r:(n.includeFallbackColors=!1,Ot.mostReadable(e,["#fff","#000"],n))};var lg=Ot.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D8=Ot.hexNames=k8(lg);function k8(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function MT(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function kn(e,t){M8(e)&&(e="100%");var n=P8(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function nh(e){return Math.min(1,Math.max(0,e))}function io(e){return parseInt(e,16)}function M8(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function P8(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Go(e){return e.length==1?"0"+e:""+e}function Cu(e){return e<=1&&(e=e*100+"%"),e}function PT(e){return Math.round(parseFloat(e)*255).toString(16)}function H0(e){return io(e)/255}var zo=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Vi(e){return!!zo.CSS_UNIT.exec(e)}function I8(e){e=e.replace(p8,"").replace(g8,"").toLowerCase();var t=!1;if(lg[e])e=lg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=zo.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=zo.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=zo.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=zo.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=zo.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=zo.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=zo.hex8.exec(e))?{r:io(n[1]),g:io(n[2]),b:io(n[3]),a:H0(n[4]),format:t?"name":"hex8"}:(n=zo.hex6.exec(e))?{r:io(n[1]),g:io(n[2]),b:io(n[3]),format:t?"name":"hex"}:(n=zo.hex4.exec(e))?{r:io(n[1]+""+n[1]),g:io(n[2]+""+n[2]),b:io(n[3]+""+n[3]),a:H0(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=zo.hex3.exec(e))?{r:io(n[1]+""+n[1]),g:io(n[2]+""+n[2]),b:io(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function L8(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var G0=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return h8(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},wu=function(t,n){var r=t.hex?Ot(t.hex):Ot(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var u=l==="000000"&&a.a===0;return{hsl:o,hex:u?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},Wa=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Ot(t).isValid()},Pm=function(t){if(!t)return"#fff";var n=wu(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},ap=function(t,n){var r=t.replace("°","");return Ot(n+" ("+r+")")._ok},fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function j8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function W8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Zr=function(t){var n=function(r){W8(o,r);function o(i){j8(this,o);var a=B8(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return a.handleChange=function(l,u){var p=G0(l);if(p){var m=wu(l,l.h||a.state.oldHue);a.setState(m),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,m,u),a.props.onChange&&a.props.onChange(m,u)}},a.handleSwatchHover=function(l,u){var p=G0(l);if(p){var m=wu(l,l.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(m,u)}},a.state=fu({},wu(i.color,0)),a.debounce=DT(function(l,u,p){l(u,p)},100),a}return F8(o,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),H.createElement(t,fu({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,l){return fu({},wu(a.color,l.oldHue))}}]),o}(H.PureComponent||H.Component);return n.propTypes=fu({},t.propTypes),n.defaultProps=fu({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},z8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function G8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function V8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var K8=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){V8(o,r);function o(){var i,a,l,u;G8(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=V0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},a),V0(l,u)}return H8(o,[{key:"render",value:function(){return H.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},H.createElement(t,z8({},this.props,this.state)))}}]),o}(H.Component)},K0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U8=13,Y8=function(t){var n=t.color,r=t.style,o=t.onClick,i=o===void 0?function(){}:o,a=t.onHover,l=t.title,u=l===void 0?n:l,p=t.children,m=t.focus,b=t.focusStyle,C=b===void 0?{}:b,_=n==="transparent",y=zt({default:{swatch:K0({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,m?C:{})}}),v=function(P){return i(n,P)},T=function(P){return P.keyCode===U8&&i(n,P)},O=function(P){return a(n,P)},R={};return a&&(R.onMouseOver=O),H.createElement("div",K0({style:y.swatch,onClick:v,title:u,tabIndex:0,onKeyDown:T},R),p,_&&H.createElement(fc,{borderRadius:y.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ks=K8(Y8);var q8=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},Z8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IT=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,l=t.direction,u=t.style,p=t.renderers,m=t.pointer,b=t.className,C=b===void 0?"":b,_=zt({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:u}}});return H.createElement("div",{style:_.picker,className:"alpha-picker "+C},H.createElement(Nm,Z8({},_.alpha,{rgb:n,hsl:r,pointer:m,renderers:p,onChange:a,direction:l})))};IT.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:q8};Zr(IT);function LT(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var J8="__lodash_hash_undefined__";function X8(e){return this.__data__.set(e,J8),this}function Q8(e){return this.__data__.has(e)}function Sf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new oa;++t<n;)this.add(e[t])}Sf.prototype.add=Sf.prototype.push=X8;Sf.prototype.has=Q8;function eV(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function tV(e,t){return e.has(t)}var nV=1,rV=2;function FT(e,t,n,r,o,i){var a=n&nV,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var b=-1,C=!0,_=n&rV?new Sf:void 0;for(i.set(e,t),i.set(t,e);++b<l;){var y=e[b],v=t[b];if(r)var T=a?r(v,y,b,t,e,i):r(y,v,b,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(_){if(!eV(t,function(O,R){if(!tV(_,R)&&(y===O||o(y,O,n,r,i)))return _.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}function oV(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function iV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var aV=1,sV=2,lV="[object Boolean]",cV="[object Date]",uV="[object Error]",dV="[object Map]",fV="[object Number]",hV="[object RegExp]",pV="[object Set]",gV="[object String]",mV="[object Symbol]",yV="[object ArrayBuffer]",vV="[object DataView]",U0=ja?ja.prototype:void 0,sp=U0?U0.valueOf:void 0;function bV(e,t,n,r,o,i,a){switch(n){case vV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case yV:return!(e.byteLength!=t.byteLength||!i(new Cf(e),new Cf(t)));case lV:case cV:case fV:return Yu(+e,+t);case uV:return e.name==t.name&&e.message==t.message;case hV:case gV:return e==t+"";case dV:var l=oV;case pV:var u=r&aV;if(l||(l=iV),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=sV,a.set(e,t);var m=FT(l(e),l(t),r,o,i,a);return a.delete(e),m;case mV:if(sp)return sp.call(e)==sp.call(t)}return!1}function _V(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function xV(e,t,n){var r=t(e);return ho(e)?r:_V(r,n(e))}function EV(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function CV(){return[]}var wV=Object.prototype,TV=wV.propertyIsEnumerable,Y0=Object.getOwnPropertySymbols,NV=Y0?function(e){return e==null?[]:(e=Object(e),EV(Y0(e),function(t){return TV.call(e,t)}))}:CV;function q0(e){return xV(e,Mm,NV)}var SV=1,OV=Object.prototype,AV=OV.hasOwnProperty;function RV(e,t,n,r,o,i){var a=n&SV,l=q0(e),u=l.length,p=q0(t),m=p.length;if(u!=m&&!a)return!1;for(var b=u;b--;){var C=l[b];if(!(a?C in t:AV.call(t,C)))return!1}var _=i.get(e),y=i.get(t);if(_&&y)return _==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++b<u;){C=l[b];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var cg=Ds(Xo,"DataView"),ug=Ds(Xo,"Promise"),dg=Ds(Xo,"Set"),fg=Ds(Xo,"WeakMap"),Z0="[object Map]",$V="[object Object]",J0="[object Promise]",X0="[object Set]",Q0="[object WeakMap]",eb="[object DataView]",DV=$s(cg),kV=$s(ku),MV=$s(ug),PV=$s(dg),IV=$s(fg),Da=Rs;(cg&&Da(new cg(new ArrayBuffer(1)))!=eb||ku&&Da(new ku)!=Z0||ug&&Da(ug.resolve())!=J0||dg&&Da(new dg)!=X0||fg&&Da(new fg)!=Q0)&&(Da=function(e){var t=Rs(e),n=t==$V?e.constructor:void 0,r=n?$s(n):"";if(r)switch(r){case DV:return eb;case kV:return Z0;case MV:return J0;case PV:return X0;case IV:return Q0}return t});var LV=1,tb="[object Arguments]",nb="[object Array]",Wd="[object Object]",FV=Object.prototype,rb=FV.hasOwnProperty;function jV(e,t,n,r,o,i){var a=ho(e),l=ho(t),u=a?nb:Da(e),p=l?nb:Da(t);u=u==tb?Wd:u,p=p==tb?Wd:p;var m=u==Wd,b=p==Wd,C=u==p;if(C&&Tf(e)){if(!Tf(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new Ei),a||Dm(e)?FT(e,t,n,r,o,i):bV(e,t,u,n,r,o,i);if(!(n&LV)){var _=m&&rb.call(e,"__wrapped__"),y=b&&rb.call(t,"__wrapped__");if(_||y){var v=_?e.value():e,T=y?t.value():t;return i||(i=new Ei),o(v,T,n,r,i)}}return C?(i||(i=new Ei),RV(e,t,n,r,o,i)):!1}function Im(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ba(e)&&!Ba(t)?e!==e&&t!==t:jV(e,t,n,r,Im,o)}var BV=1,WV=2;function zV(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],p=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var m=new Ei,b;if(!(b===void 0?Im(p,u,BV|WV,r,m):b))return!1}}return!0}function jT(e){return e===e&&!To(e)}function HV(e){for(var t=Mm(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,jT(o)]}return t}function BT(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function GV(e){var t=HV(e);return t.length==1&&t[0][2]?BT(t[0][0],t[0][1]):function(n){return n===e||zV(n,e,t)}}var VV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KV=/^\w*$/;function Lm(e,t){if(ho(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||eh(e)?!0:KV.test(e)||!VV.test(e)||t!=null&&e in Object(t)}var UV="Expected a function";function Fm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(UV);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Fm.Cache||oa),n}Fm.Cache=oa;var YV=500;function qV(e){var t=Fm(e,function(r){return n.size===YV&&n.clear(),r}),n=t.cache;return t}var ZV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JV=/\\(\\)?/g,XV=qV(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZV,function(n,r,o,i){t.push(o?i.replace(JV,"$1"):r||n)}),t}),QV=1/0,ob=ja?ja.prototype:void 0,ib=ob?ob.toString:void 0;function WT(e){if(typeof e=="string")return e;if(ho(e))return LT(e,WT)+"";if(eh(e))return ib?ib.call(e):"";var t=e+"";return t=="0"&&1/e==-QV?"-0":t}function eK(e){return e==null?"":WT(e)}function zT(e,t){return ho(e)?e:Lm(e,t)?[e]:XV(eK(e))}var tK=1/0;function rh(e){if(typeof e=="string"||eh(e))return e;var t=e+"";return t=="0"&&1/e==-tK?"-0":t}function HT(e,t){t=zT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[rh(t[n++])];return n&&n==r?e:void 0}function nK(e,t,n){var r=e==null?void 0:HT(e,t);return r===void 0?n:r}function rK(e,t){return e!=null&&t in Object(e)}function oK(e,t,n){t=zT(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=rh(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&$m(o)&&km(a,o)&&(ho(e)||wf(e)))}function iK(e,t){return e!=null&&oK(e,t,rK)}var aK=1,sK=2;function lK(e,t){return Lm(e)&&jT(t)?BT(rh(e),t):function(n){var r=nK(n,e);return r===void 0&&r===t?iK(n,e):Im(t,r,aK|sK)}}function cK(e){return function(t){return t==null?void 0:t[e]}}function uK(e){return function(t){return HT(t,e)}}function dK(e){return Lm(e)?cK(rh(e)):uK(e)}function fK(e){return typeof e=="function"?e:e==null?Qf:typeof e=="object"?ho(e)?lK(e[0],e[1]):GV(e):dK(e)}function hK(e,t){var n=-1,r=pc(e)?Array(e.length):[];return kT(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function Ms(e,t){var n=ho(e)?LT:hK;return n(e,fK(t))}var pK=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=zt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return H.createElement("div",{style:i.swatches},Ms(n,function(a){return H.createElement(ks,{key:a,color:a,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+a}})}),H.createElement("div",{style:i.clear}))},jm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=o==="transparent",_=function(T,O){Wa(T)&&n({hex:T,source:"hex"},O)},y=zt(qr({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Pm(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},p),{"hide-triangle":l==="hide"});return H.createElement("div",{style:y.card,className:"block-picker "+b},H.createElement("div",{style:y.triangle}),H.createElement("div",{style:y.head},C&&H.createElement(fc,{borderRadius:"6px 6px 0 0"}),H.createElement("div",{style:y.label},o)),H.createElement("div",{style:y.body},H.createElement(pK,{colors:i,onClick:_,onSwatchHover:r}),H.createElement(en,{style:{input:y.input},value:o,onChange:_})))};jm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["top","hide"]),styles:ct.object};jm.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Zr(jm);var Cl={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},wl={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Tl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Nl={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Sl={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Ol={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Al={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Rl={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},$l={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Tu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Dl={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},kl={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Ml={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Pl={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Il={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Ll={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Fl={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},jl={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},GT=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,l=t.circleSize,u=t.circleSpacing,p=zt({default:{swatch:{width:l,height:l,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return H.createElement("div",{style:p.swatch},H.createElement(ks,{style:p.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:p.Swatch.boxShadow+", 0 0 5px "+n}}))};GT.defaultProps={circleSize:28,circleSpacing:14};const gK=Tm(GT);var Bm=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,l=t.circleSize,u=t.styles,p=u===void 0?{}:u,m=t.circleSpacing,b=t.className,C=b===void 0?"":b,_=zt(qr({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-m,marginBottom:-m}}},p)),y=function(T,O){return r({hex:T,source:"hex"},O)};return H.createElement("div",{style:_.card,className:"circle-picker "+C},Ms(i,function(v){return H.createElement(gK,{key:v,color:v,onClick:y,onSwatchHover:o,active:a===v.toLowerCase(),circleSize:l,circleSpacing:m})}))};Bm.propTypes={width:ct.oneOfType([ct.string,ct.number]),circleSize:ct.number,circleSpacing:ct.number,styles:ct.object};Bm.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Cl[500],wl[500],Tl[500],Nl[500],Sl[500],Ol[500],Al[500],Rl[500],$l[500],Tu[500],Dl[500],kl[500],Ml[500],Pl[500],Il[500],Ll[500],Fl[500],jl[500]],styles:{}};Zr(Bm);function ab(e){return e===void 0}var VT={};Object.defineProperty(VT,"__esModule",{value:!0});var sb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mK=H,lb=yK(mK);function yK(e){return e&&e.__esModule?e:{default:e}}function vK(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var zd=24,bK=VT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?zd:r,i=e.height,a=i===void 0?zd:i,l=e.style,u=l===void 0?{}:l,p=vK(e,["fill","width","height","style"]);return lb.default.createElement("svg",sb({viewBox:"0 0 "+zd+" "+zd,style:sb({fill:n,width:o,height:a},u)},p),lb.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},_K=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function xK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EK(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function CK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var KT=function(e){CK(t,e);function t(n){xK(this,t);var r=EK(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,i){o.hex?Wa(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},i):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},i):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(ab(o.s)?r.props.hsl.s:o.s),l:Number(ab(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return _K(t,[{key:"render",value:function(){var r=this,o=zt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),H.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,H.createElement("div",{style:o.toggle},H.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},H.createElement(bK,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(H.Component);KT.defaultProps={view:"hex"};var cb=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},wK=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return H.createElement("div",{style:t.picker})},Wm=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,p=t.renderers,m=t.styles,b=m===void 0?{}:m,C=t.className,_=C===void 0?"":C,y=t.defaultView,v=zt(qr({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},b),{disableAlpha:o});return H.createElement("div",{style:v.picker,className:"chrome-picker "+_},H.createElement("div",{style:v.saturation},H.createElement(th,{style:v.Saturation,hsl:a,hsv:l,pointer:wK,onChange:r})),H.createElement("div",{style:v.body},H.createElement("div",{style:v.controls,className:"flexbox-fix"},H.createElement("div",{style:v.color},H.createElement("div",{style:v.swatch},H.createElement("div",{style:v.active}),H.createElement(fc,{renderers:p}))),H.createElement("div",{style:v.toggles},H.createElement("div",{style:v.hue},H.createElement(hc,{style:v.Hue,hsl:a,pointer:cb,onChange:r})),H.createElement("div",{style:v.alpha},H.createElement(Nm,{style:v.Alpha,rgb:i,hsl:a,pointer:cb,renderers:p,onChange:r})))),H.createElement(KT,{rgb:i,hsl:a,hex:u,view:y,onChange:r,disableAlpha:o})))};Wm.propTypes={width:ct.oneOfType([ct.string,ct.number]),disableAlpha:ct.bool,styles:ct.object,defaultView:ct.oneOf(["hex","rgb","hsl"])};Wm.defaultProps={width:225,disableAlpha:!1,styles:{}};Zr(Wm);var TK=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=zt({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Pm(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(ks,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:l.dot}))},NK=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=zt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(u,p){u.r||u.g||u.b?o({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},p):o({hex:u.hex,source:"hex"},p)};return H.createElement("div",{style:i.fields,className:"flexbox-fix"},H.createElement("div",{style:i.active}),H.createElement(en,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},zm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,b=zt(qr({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),C=function(y,v){y.hex?Wa(y.hex)&&n({hex:y.hex,source:"hex"},v):n(y,v)};return H.createElement(qu,{style:b.Compact,styles:u},H.createElement("div",{style:b.compact,className:"compact-picker "+m},H.createElement("div",null,Ms(o,function(_){return H.createElement(TK,{key:_,color:_,active:_.toLowerCase()===i,onClick:C,onSwatchHover:r})}),H.createElement("div",{style:b.clear})),H.createElement(NK,{hex:i,rgb:a,onChange:C})))};zm.propTypes={colors:ct.arrayOf(ct.string),styles:ct.object};zm.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Zr(zm);var SK=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=zt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return H.createElement("div",{style:l.swatch},H.createElement(ks,{color:r,onClick:o,onHover:i,focusStyle:a}))};const OK=Tm(SK);var Hm=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,b=zt(qr({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),C=function(y,v){return o({hex:y,source:"hex"},v)};return H.createElement("div",{style:b.card,className:"github-picker "+m},H.createElement("div",{style:b.triangleShadow}),H.createElement("div",{style:b.triangle}),Ms(r,function(_){return H.createElement(OK,{color:_,key:_,onClick:C,onSwatchHover:i})}))};Hm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ct.object};Hm.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Zr(Hm);var AK=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},RK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gm=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,l=t.pointer,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(qr({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},p)),_=function(v){return o({a:1,h:v.h,l:.5,s:1})};return H.createElement("div",{style:C.picker,className:"hue-picker "+b},H.createElement(hc,RK({},C.hue,{hsl:i,pointer:l,onChange:_,direction:a})))};Gm.propTypes={styles:ct.object};Gm.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:AK,styles:{}};Zr(Gm);var $K=function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(qr({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),m=function(C,_){C.hex?Wa(C.hex)&&n({hex:C.hex,source:"hex"},_):(C.r||C.g||C.b)&&n({r:C.r||o.r,g:C.g||o.g,b:C.b||o.b,source:"rgb"},_)};return H.createElement(qu,{styles:a},H.createElement("div",{style:p.material,className:"material-picker "+u},H.createElement(en,{style:{wrap:p.HEXwrap,input:p.HEXinput,label:p.HEXlabel},label:"hex",value:r,onChange:m}),H.createElement("div",{style:p.split,className:"flexbox-fix"},H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"r",value:o.r,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"g",value:o.g,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"b",value:o.b,onChange:m})))))};Zr($K);var DK=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=zt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(p,m){p["#"]?Wa(p["#"])&&n({hex:p["#"],source:"hex"},m):p.r||p.g||p.b?n({r:p.r||r.r,g:p.g||r.g,b:p.b||r.b,source:"rgb"},m):(p.h||p.s||p.v)&&n({h:p.h||o.h,s:p.s||o.s,v:p.v||o.v,source:"hsv"},m)};return H.createElement("div",{style:a.fields},H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),H.createElement("div",{style:a.fieldSymbols},H.createElement("div",{style:a.symbol},"°"),H.createElement("div",{style:a.symbol},"%"),H.createElement("div",{style:a.symbol},"%")))},kK=function(t){var n=t.hsl,r=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return H.createElement("div",{style:r.picker})},MK=function(){var t=zt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return H.createElement("div",{style:t.pointer},H.createElement("div",{style:t.left},H.createElement("div",{style:t.leftInside})),H.createElement("div",{style:t.right},H.createElement("div",{style:t.rightInside})))},ub=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=zt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return H.createElement("div",{style:a.button,onClick:n},r||o)},PK=function(t){var n=t.rgb,r=t.currentColor,o=zt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return H.createElement("div",null,H.createElement("div",{style:o.label},"new"),H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.new}),H.createElement("div",{style:o.current})),H.createElement("div",{style:o.label},"current"))},IK=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function LK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FK(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function jK(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Vm=function(e){jK(t,e);function t(n){LK(this,t);var r=FK(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return IK(t,[{key:"render",value:function(){var r=this.props,o=r.styles,i=o===void 0?{}:o,a=r.className,l=a===void 0?"":a,u=zt(qr({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return H.createElement("div",{style:u.picker,className:"photoshop-picker "+l},H.createElement("div",{style:u.head},this.props.header),H.createElement("div",{style:u.body,className:"flexbox-fix"},H.createElement("div",{style:u.saturation},H.createElement(th,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:kK,onChange:this.props.onChange})),H.createElement("div",{style:u.hue},H.createElement(hc,{direction:"vertical",hsl:this.props.hsl,pointer:MK,onChange:this.props.onChange})),H.createElement("div",{style:u.controls},H.createElement("div",{style:u.top,className:"flexbox-fix"},H.createElement("div",{style:u.previews},H.createElement(PK,{rgb:this.props.rgb,currentColor:this.state.currentColor})),H.createElement("div",{style:u.actions},H.createElement(ub,{label:"OK",onClick:this.props.onAccept,active:!0}),H.createElement(ub,{label:"Cancel",onClick:this.props.onCancel}),H.createElement(DK,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(H.Component);Vm.propTypes={header:ct.string,styles:ct.object};Vm.defaultProps={header:"Color Picker",styles:{}};Zr(Vm);var BK=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,l=zt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),u=function(m,b){m.hex?Wa(m.hex)&&n({hex:m.hex,source:"hex"},b):m.r||m.g||m.b?n({r:m.r||r.r,g:m.g||r.g,b:m.b||r.b,a:r.a,source:"rgb"},b):m.a&&(m.a<0?m.a=0:m.a>100&&(m.a=100),m.a/=100,n({h:o.h,s:o.s,l:o.l,a:m.a,source:"rgb"},b))};return H.createElement("div",{style:l.fields,className:"flexbox-fix"},H.createElement("div",{style:l.double},H.createElement(en,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:u})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.alpha},H.createElement(en,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},WK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UT=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=zt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),l=function(p,m){o({hex:p,source:"hex"},m)};return H.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map(function(u){var p=typeof u=="string"?{color:u}:u,m=""+p.color+(p.title||"");return H.createElement("div",{key:m,style:a.swatchWrap},H.createElement(ks,WK({},p,{style:a.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+p.color}})))}))};UT.propTypes={colors:ct.arrayOf(ct.oneOfType([ct.string,ct.shape({color:ct.string,title:ct.string})])).isRequired};var zK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Km=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,p=t.disableAlpha,m=t.presetColors,b=t.renderers,C=t.styles,_=C===void 0?{}:C,y=t.className,v=y===void 0?"":y,T=zt(qr({default:zK({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},_),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},_),{disableAlpha:p});return H.createElement("div",{style:T.picker,className:"sketch-picker "+v},H.createElement("div",{style:T.saturation},H.createElement(th,{style:T.Saturation,hsl:a,hsv:i,onChange:l})),H.createElement("div",{style:T.controls,className:"flexbox-fix"},H.createElement("div",{style:T.sliders},H.createElement("div",{style:T.hue},H.createElement(hc,{style:T.Hue,hsl:a,onChange:l})),H.createElement("div",{style:T.alpha},H.createElement(Nm,{style:T.Alpha,rgb:r,hsl:a,renderers:b,onChange:l}))),H.createElement("div",{style:T.color},H.createElement(fc,null),H.createElement("div",{style:T.activeColor}))),H.createElement(BK,{rgb:r,hsl:a,hex:o,onChange:l,disableAlpha:p}),H.createElement(UT,{colors:m,onClick:l,onSwatchHover:u}))};Km.propTypes={disableAlpha:ct.bool,width:ct.oneOfType([ct.string,ct.number]),styles:ct.object};Km.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const HK=Zr(Km);var hu=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=o===void 0?function(){}:o,a=t.active,l=t.first,u=t.last,p=zt({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:u}),m=function(C){return i({h:n.h,s:.5,l:r,source:"hsl"},C)};return H.createElement("div",{style:p.swatch,onClick:m})},GK=function(t){var n=t.onClick,r=t.hsl,o=zt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.swatch},H.createElement(hu,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),H.createElement("div",{style:o.swatch},H.createElement(hu,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(hu,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(hu,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(hu,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),H.createElement("div",{style:o.clear}))},VK=function(){var t=zt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},Um=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(qr({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return H.createElement("div",{style:p.wrap||{},className:"slider-picker "+u},H.createElement("div",{style:p.hue},H.createElement(hc,{style:p.Hue,hsl:n,pointer:o,onChange:r})),H.createElement("div",{style:p.swatches},H.createElement(GK,{hsl:n,onClick:r})))};Um.propTypes={styles:ct.object};Um.defaultProps={pointer:VK,styles:{}};Zr(Um);var YT={};Object.defineProperty(YT,"__esModule",{value:!0});var db=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KK=H,fb=UK(KK);function UK(e){return e&&e.__esModule?e:{default:e}}function YK(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Hd=24,qK=YT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Hd:r,i=e.height,a=i===void 0?Hd:i,l=e.style,u=l===void 0?{}:l,p=YK(e,["fill","width","height","style"]);return fb.default.createElement("svg",db({viewBox:"0 0 "+Hd+" "+Hd,style:db({fill:n,width:o,height:a},u)},p),fb.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},ZK=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,u=t.active,p=zt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Pm(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:u,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(ks,{color:n,style:p.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:p.check},H.createElement(qK,null)))},JK=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=zt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return H.createElement("div",{style:a.group},Ms(o,function(l,u){return H.createElement(ZK,{key:l,color:l,active:l.toLowerCase()===i,first:u===0,last:u===o.length-1,onClick:n,onSwatchHover:r})}))},Ym=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(qr({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},p)),_=function(v,T){return o({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.picker,className:"swatches-picker "+b},H.createElement(qu,null,H.createElement("div",{style:C.overflow},H.createElement("div",{style:C.body},Ms(a,function(y){return H.createElement(JK,{key:y.toString(),group:y,active:l,onClick:_,onSwatchHover:i})}),H.createElement("div",{style:C.clear})))))};Ym.propTypes={width:ct.oneOfType([ct.string,ct.number]),height:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.arrayOf(ct.string)),styles:ct.object};Ym.defaultProps={width:320,height:240,colors:[[Cl[900],Cl[700],Cl[500],Cl[300],Cl[100]],[wl[900],wl[700],wl[500],wl[300],wl[100]],[Tl[900],Tl[700],Tl[500],Tl[300],Tl[100]],[Nl[900],Nl[700],Nl[500],Nl[300],Nl[100]],[Sl[900],Sl[700],Sl[500],Sl[300],Sl[100]],[Ol[900],Ol[700],Ol[500],Ol[300],Ol[100]],[Al[900],Al[700],Al[500],Al[300],Al[100]],[Rl[900],Rl[700],Rl[500],Rl[300],Rl[100]],[$l[900],$l[700],$l[500],$l[300],$l[100]],["#194D33",Tu[700],Tu[500],Tu[300],Tu[100]],[Dl[900],Dl[700],Dl[500],Dl[300],Dl[100]],[kl[900],kl[700],kl[500],kl[300],kl[100]],[Ml[900],Ml[700],Ml[500],Ml[300],Ml[100]],[Pl[900],Pl[700],Pl[500],Pl[300],Pl[100]],[Il[900],Il[700],Il[500],Il[300],Il[100]],[Ll[900],Ll[700],Ll[500],Ll[300],Ll[100]],[Fl[900],Fl[700],Fl[500],Fl[300],Fl[100]],[jl[900],jl[700],jl[500],jl[300],jl[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Zr(Ym);var qm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(qr({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),_=function(v,T){Wa(v)&&n({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.card,className:"twitter-picker "+b},H.createElement("div",{style:C.triangleShadow}),H.createElement("div",{style:C.triangle}),H.createElement("div",{style:C.body},Ms(i,function(y,v){return H.createElement(ks,{key:v,color:y,hex:y,style:C.swatch,onClick:_,onHover:r,focusStyle:{boxShadow:"0 0 4px "+y}})}),H.createElement("div",{style:C.hash},"#"),H.createElement(en,{label:null,style:{input:C.input},value:o.replace("#",""),onChange:_}),H.createElement("div",{style:C.clear})))};qm.propTypes={width:ct.oneOfType([ct.string,ct.number]),triangle:ct.oneOf(["hide","top-left","top-right"]),colors:ct.arrayOf(ct.string),styles:ct.object};qm.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Zr(qm);var Zm=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return H.createElement("div",{style:n.picker})};Zm.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};Zm.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Jm=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return H.createElement("div",{style:n.picker})};Jm.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};Jm.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var XK=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(_,y){if(_.hex)Wa(_.hex)&&n({hex:_.hex,source:"hex"},y);else if(_.rgb){var v=_.rgb.split(",");ap(_.rgb,"rgb")&&n({r:v[0],g:v[1],b:v[2],a:1,source:"rgb"},y)}else if(_.hsv){var T=_.hsv.split(",");ap(_.hsv,"hsv")&&(T[2]=T[2].replace("%",""),T[1]=T[1].replace("%",""),T[0]=T[0].replace("°",""),T[1]==1?T[1]=.01:T[2]==1&&(T[2]=.01),n({h:Number(T[0]),s:Number(T[1]),v:Number(T[2]),source:"hsv"},y))}else if(_.hsl){var O=_.hsl.split(",");ap(_.hsl,"hsl")&&(O[2]=O[2].replace("%",""),O[1]=O[1].replace("%",""),O[0]=O[0].replace("°",""),b[1]==1?b[1]=.01:b[2]==1&&(b[2]=.01),n({h:Number(O[0]),s:Number(O[1]),v:Number(O[2]),source:"hsl"},y))}},u=zt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),p=r.r+", "+r.g+", "+r.b,m=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",b=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return H.createElement("div",{style:u.wrap,className:"flexbox-fix"},H.createElement("div",{style:u.fields},H.createElement("div",{style:u.double},H.createElement(en,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:l})),H.createElement("div",{style:u.column},H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"rgb",value:p,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsv",value:b,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsl",value:m,onChange:l})))))},Xm=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,u=t.header,p=t.styles,m=p===void 0?{}:p,b=t.className,C=b===void 0?"":b,_=zt(qr({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},m));return H.createElement("div",{style:_.picker,className:"google-picker "+C},H.createElement("div",{style:_.head},u),H.createElement("div",{style:_.swatch}),H.createElement("div",{style:_.saturation},H.createElement(th,{hsl:i,hsv:a,pointer:Zm,onChange:r})),H.createElement("div",{style:_.body},H.createElement("div",{style:_.controls,className:"flexbox-fix"},H.createElement("div",{style:_.hue},H.createElement(hc,{style:_.Hue,hsl:i,radius:"4px",pointer:Jm,onChange:r}))),H.createElement(XK,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};Xm.propTypes={width:ct.oneOfType([ct.string,ct.number]),styles:ct.object,header:ct.string};Xm.defaultProps={width:652,styles:{},header:"Color picker"};Zr(Xm);const QK=({field:e,value:t,onChange:n})=>{const[r,o]=H.useState(!1),i=eU(t);return te.jsx(te.Fragment,{children:te.jsxs(Vn.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[te.jsx("div",{style:i.swatch,onClick:()=>o(a=>!a),children:te.jsx("div",{style:i.color})}),r&&te.jsxs("div",{style:i.popover,children:[te.jsx("div",{style:i.cover,onClick:()=>o(!1)}),te.jsx(HK,{disableAlpha:!0,color:t,onChange:a=>{n(a.hex)}})]})]})})},eU=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),tU=({label:e,onChange:t,value:n,options:r})=>{var p;const[o,i]=H.useState(!1),a=()=>{i(!o)},l=m=>{t(m),i(!1)},u=((p=r.find(m=>m.value===n))==null?void 0:p.label)??"Choose a font";return te.jsx(Vn.FieldLabel,{label:e,icon:te.jsx(em,{size:16}),children:te.jsxs("div",{style:{position:"relative"},children:[te.jsx("button",{onClick:a,className:"font-select",style:{fontFamily:n},children:u}),o&&te.jsx("div",{className:"font-select-dropdown",children:r.map(m=>te.jsx("button",{value:m.value,onClick:b=>{b.preventDefault(),l(m.value)},style:{fontFamily:m.value,backgroundColor:m.value===n?"var(--puck-color-grey-09)":""},className:"font-select-option",children:m.label},m.value))})]})})},nU=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=hb(r,r.plugin);o&&(t.objectFields[n]=o)}else{const o={label:r.label,type:"object",objectFields:{}};for(const i in r.styles)o.objectFields[i]=hb(r.styles[i],r.plugin);t.objectFields[n]=o}}),t},hb=(e,t)=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return t==="fontFamily"?{label:e.label,type:"custom",options:e.options,render:H.useCallback(({onChange:n,value:r})=>tU({label:e.label,options:typeof e.options=="function"?e.options():e.options,value:r,onChange:n}),[])}:{label:e.label,type:"select",options:typeof e.options=="function"?e.options():e.options};case"color":return{label:e.label,type:"custom",render:QK}}},rU=(e,t,n="")=>{const r={};return Object.entries(t.styles).forEach(([o,i])=>{if("type"in i){const a=e==null?void 0:e[`--${i.plugin}-${n}-${o}`];r[o]=pb(i,a)}else{const a={};for(const l in i.styles){const u=i.styles[l],p=e==null?void 0:e[`--${i.plugin}-${n}-${o}-${l}`];a[l]=pb(u,p)}r[o]=a}}),r},pb=(e,t)=>{if(t)if(e.type==="number"){const n=Number.parseInt(t);return isNaN(n)?e.default:n}else return t;else return e.default},oU=e=>{var u,p;const{themeConfig:t,themeHistoriesRef:n,onThemeChange:r}=e;if(!n.current)return;if(!t)return te.jsx("div",{children:te.jsx(Xp,{children:te.jsx(Qp,{children:"Please contact your developer to set up theme management."})})});const[o,i]=H.useState(Object.keys(t).reduce((m,b)=>({...m,[b]:!0}),{})),a=m=>{i(b=>({...b,[m]:!b[m]}))},l=(p=n.current)==null?void 0:p.histories[(u=n.current)==null?void 0:u.index].data;return te.jsxs("div",{children:[te.jsx(Xp,{children:te.jsx(Qp,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([m,b])=>{const C=nU(b),_=rU(l,b,m),y=o[m];return te.jsxs("div",{className:"theme-field",children:[te.jsxs("button",{className:"ve-flex ve-items-center ve-w-full ve-justify-between",onClick:()=>a(m),children:[`${C.label??""}`,te.jsx("div",{children:y?te.jsx(em,{size:12}):te.jsx(R$,{size:12})})]}),!y&&te.jsx(Vn.AutoField,{field:C,onChange:v=>r(m,b,v),value:_})]},m)})]})},iU=e=>{var p,m;const{isDevMode:t,setThemeHistories:n,onPublishTheme:r,themeConfig:o,themeHistories:i,clearThemeHistory:a,puckInitialHistory:l}=e,{history:{setHistories:u}}=Vn.usePuck();return H.useEffect(()=>{u((l==null?void 0:l.histories)||[])},[l]),H.useEffect(()=>{const b=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");b&&(b.style.display="none");const C=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");C&&(C.style.display="none")},[]),te.jsxs("header",{className:"puck-header",children:[te.jsxs("div",{className:"header-left",children:[te.jsx(_C,{}),te.jsx(OC,{})]}),te.jsx("div",{className:"header-center"}),te.jsxs("div",{className:"actions",children:[te.jsx(Rw,{disabled:((p=i==null?void 0:i.histories)==null?void 0:p.length)===1,onClearLocalChanges:()=>{var b,C,_,y,v,T;a(),o&&Ru((C=(b=i==null?void 0:i.histories)==null?void 0:b[0])==null?void 0:C.data,o),n({histories:[{id:((y=(_=i==null?void 0:i.histories)==null?void 0:_[0])==null?void 0:y.id)??"",data:((T=(v=i==null?void 0:i.histories)==null?void 0:v[0])==null?void 0:T.data)??{}}],index:0})}}),!t&&te.jsx(qi,{variant:"secondary",disabled:((m=i==null?void 0:i.histories)==null?void 0:m.length)===1,onClick:async()=>{await r()},children:"Publish"})]})]})},lp=new Ur,aU=({puckConfig:e,puckInitialHistory:t,isLoading:n,templateMetadata:r,publishTheme:o,themeConfig:i,saveThemeSaveState:a,themeHistories:l,setThemeHistories:u,clearThemeHistory:p,sendDevThemeSaveStateData:m,buildThemeLocalStorageKey:b})=>{const[C,_]=H.useState(!1),y=H.useRef(l);H.useEffect(()=>{y.current=l},[l]);const v=async()=>{if(lp.logFunc("saveThemeData"),!l)return;const k=l.histories[l.index];o({payload:{saveThemeData:JSON.stringify(k.data)}}),p(),u({histories:[k],index:0})},T=(k,P,M)=>{var oe,Z,K,Q;if(!y.current||!i)return;const Y={...(oe=y.current.histories[y.current.index])==null?void 0:oe.data,...X1(M,k,P)},X={histories:[...y.current.histories,{id:Rg.v4(),data:Y}],index:y.current.histories.length};window.localStorage.setItem(b(),JSON.stringify(X.histories)),r.isDevMode&&!r.devOverride?(lp.logFunc("sendDevThemeSaveStateData"),m({payload:{devThemeSaveStateData:JSON.stringify((Z=X.histories[X.index])==null?void 0:Z.data)}})):(lp.logFunc("saveTheme"),a({payload:{history:JSON.stringify((K=X.histories[X.index])==null?void 0:K.data),hash:(Q=X.histories[X.index])==null?void 0:Q.id}})),Ru(Y,i),u(X)},O=async()=>{if(!n&&!C){_(!0);return}},R=H.useCallback(()=>te.jsx(oU,{themeHistoriesRef:y,themeConfig:i,onThemeChange:T}),[]);return te.jsx(mC,{children:te.jsx(Vn.Puck,{config:e,data:{},initialHistory:t,onChange:O,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>te.jsx(iU,{themeConfig:i,themeHistories:l,onPublishTheme:v,isDevMode:r.isDevMode,setThemeHistories:u,clearThemeHistory:p,puckInitialHistory:t}),actionBar:()=>te.jsx(te.Fragment,{}),components:()=>te.jsx(te.Fragment,{}),fields:R}})})},sU=()=>{const{sendToParent:e}=Ho("saveThemeSaveState",lr),{sendToParent:t}=Ho("deleteThemeSaveState",lr),{sendToParent:n}=Ho("publishTheme",lr);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishTheme:n}},lU=new Ur,cU=()=>{const{iFrameLoaded:e}=Ss();H.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,n]=H.useState(void 0),[r,o]=H.useState(!1);return Pa("getThemeSaveState",lr,(i,a)=>{let l;a!=null&&a.history&&(l={hash:a.hash,history:ff(a.history)}),lU.logData("THEME_SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:r}},Vr=new Ur,uU=e=>{const{puckConfig:t,templateMetadata:n,layoutData:r,themeData:o,themeConfig:i}=e,{sendDevLayoutSaveStateData:a,sendDevThemeSaveStateData:l}=Ss(),{saveThemeSaveState:u,publishTheme:p,deleteThemeSaveState:m}=sU(),{themeSaveState:b,themeSaveStateFetched:C}=cU(),{buildThemeLocalStorageKey:_,clearThemeLocalStorage:y}=Dw(n),{buildVisualConfigLocalStorageKey:v}=$w(n),[T,O]=H.useState(),[R,k]=H.useState(!1),[P,M]=H.useState(),[Y,X]=H.useState(!1),oe=H.useCallback(()=>{if(!n)return;Vr.logFunc("loadPuckInitialHistory");const pe=window.localStorage.getItem(v());if(n.isDevMode&&pe){const ne=JSON.parse(pe),fe=ne.length-1;if(fe>=0){Vr.log("Theme Dev Mode - Using layout data from local storage"),O({histories:ne.map(j=>({id:j.id,state:{data:{...j.state.data}}})),index:fe,appendData:!1});const U=T==null?void 0:T.histories[T.histories.length-1].state.data;a({payload:{devSaveStateData:JSON.stringify(U)}})}k(!0);return}r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0)},[O,k,r]),Z=H.useCallback(()=>{if(!n)return;if(Vr.logFunc("loadThemeHistory"),Vr.logData("THEME_DATA",o),Vr.logData("THEME_SAVE_STATE",b),n.isDevMode&&!n.devOverride){const fe=window.localStorage.getItem(_());if(fe){Vr.log("Theme Dev Mode - Using theme localStorage");const U=JSON.parse(fe),j=U.length-1;M({histories:U,index:j}),X(!0);return}Vr.log("Theme Dev Mode - No localStorage. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}if(!b){y(),Vr.log("Theme Prod Mode - No saveState. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}const pe=window.localStorage.getItem(_());if(!pe){Vr.log("Theme Prod Mode - No localStorage. Using themeSaveState"),M({histories:o?[{id:"root",data:o},{id:b.hash,data:b.history.data}]:[{id:b.hash,data:b.history.data}],index:o?1:0}),X(!0);return}const ne=JSON.parse(pe).findIndex(fe=>fe.id===(b==null?void 0:b.hash));if(ne!==-1){Vr.log("Theme Prod Mode - Using localStorage theme data"),M({histories:JSON.parse(pe),index:ne}),X(!0);return}y()},[M,X,y,_]);H.useEffect(()=>{var pe;Vr.logData("THEME_HISTORIES",P),P&&i&&Ru((pe=P.histories[P.index])==null?void 0:pe.data,i)},[P,i]),H.useEffect(()=>{C&&(oe(),Z())},[n,C,r]),H.useEffect(()=>{T&&Vr.logData("PUCK_INITIAL_HISTORY",T)},[T]);const K=()=>{Vr.logFunc("clearHistory"),y(),m()};H.useEffect(()=>{var ne;if(!Y)return;const pe=(ne=P==null?void 0:P.histories[P.index])==null?void 0:ne.data;Vr.logFunc("sendDevThemeSaveStateData useEffect"),l({payload:{devThemeSaveStateData:JSON.stringify(pe)}})},[Y,P,n]);const Q=!R||!Y||!C,de=60+(R+Y+C)*13.33;return Q?te.jsx(Bg,{progress:de}):te.jsx(aU,{puckConfig:t,puckInitialHistory:T,isLoading:Q,templateMetadata:n,publishTheme:p,themeConfig:i,saveThemeSaveState:u,themeHistories:P,setThemeHistories:M,clearThemeHistory:K,sendDevThemeSaveStateData:l,buildThemeLocalStorageKey:_})},dU=new Ur,fU=({document:e,componentRegistry:t,themeConfig:n})=>{e&&dU.logData("DOCUMENT",e);const[r,o]=H.useState(void 0),[i,a]=H.useState(void 0),[l,u]=H.useState(!1),{templateMetadata:p,puckConfig:m,layoutData:b,layoutDataFetched:C,themeData:_,themeDataFetched:y}=MA(t),{pushPageSets:v}=Ss();kA(),H.useEffect(()=>{if(typeof window<"u"){const R=window.location.ancestorOrigins;R.length===0||!R[0].includes("pagescdn")&&!R[0].includes("yext.com")&&!R[0].includes("localhost")?window.location.assign("/404.html"):u(!0)}},[]),H.useEffect(()=>{if(p!=null&&p.isDevMode)try{o(pageSets),a(siteStream)}catch{console.warn("pageSets are not defined")}},[p==null?void 0:p.isDevMode]),H.useEffect(()=>{typeof window<"u"&&(p!=null&&p.isDevMode)&&r&&v({payload:{...r,siteStream:i}})},[p==null?void 0:p.isDevMode,r]);const T=!m||!p||!e||!C||!y,O=60*((!!m+!!p+!!e+C+y)/5);return te.jsxs(te.Fragment,{children:[T?l&&te.jsx(Bg,{progress:O}):p.isThemeMode?te.jsx(uU,{puckConfig:m,templateMetadata:p,layoutData:b,themeData:_,themeConfig:n}):te.jsx(Rk,{puckConfig:m,templateMetadata:p,layoutData:b,themeData:_,themeConfig:n}),te.jsx(DA,{closeButton:!0,richColors:!0})]})},hU=["uid","meta","slug"],pU=[],qT=e=>ZT(e,""),ZT=(e,t)=>{var o,i,a;const n=t?`${t}.${e.name}`:e.name;if(pU.includes(JT(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[{name:n,schemaField:e}];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((a=(i=e.children)==null?void 0:i.fields)==null?void 0:a.length)>0)for(const l of e.children.fields)r.push(...ZT(l,n));return r},JT=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function gU(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const mU=e=>e.reduce((t,n)=>{const r=qT(n);for(const o of r){const i=JT(o.schemaField);i&&(t=gU(t,i,o.name))}return t},new Map),yU=e=>{let n=dE().filter(o=>!hU.includes(o.name));if(e!=null&&e.allowList){const o=n.map(i=>i.name);e.allowList.forEach(i=>{o.includes(i)||console.warn(`The entity field filter allowList included ${i}, which does not exist in the stream.`)}),n=n.filter(i=>e.allowList.includes(i.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const i=qT(o);for(const a of i)r.push({...a.schemaField,name:a.name})}if(e!=null&&e.types){const o=mU(r),i=[];e.types.forEach(a=>{i.push(...r.filter(l=>{var u;return(u=o.get(a))==null?void 0:u.includes(l.name)}))}),r=i}return r=r.filter(o=>!!o.definition.isList==!!(e!=null&&e.includeListsOnly)),r};function vU(e){const t=e+"CollectionProvider",[n,r]=kf(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=_=>{const{scope:y,children:v}=_,T=H.useRef(null),O=H.useRef(new Map).current;return te.jsx(o,{scope:y,itemMap:O,collectionRef:T,children:v})};a.displayName=t;const l=e+"CollectionSlot",u=H.forwardRef((_,y)=>{const{scope:v,children:T}=_,O=i(l,v),R=ur(y,O.collectionRef);return te.jsx(xs,{ref:R,children:T})});u.displayName=l;const p=e+"CollectionItemSlot",m="data-radix-collection-item",b=H.forwardRef((_,y)=>{const{scope:v,children:T,...O}=_,R=H.useRef(null),k=ur(y,R),P=i(p,v);return H.useEffect(()=>(P.itemMap.set(R,{ref:R,...O}),()=>void P.itemMap.delete(R))),te.jsx(xs,{[m]:"",ref:k,children:T})});b.displayName=p;function C(_){const y=i(e+"CollectionConsumer",_);return H.useCallback(()=>{const T=y.collectionRef.current;if(!T)return[];const O=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(y.itemMap.values()).sort((P,M)=>O.indexOf(P.ref.current)-O.indexOf(M.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:b},C,r]}var bU=ge.createContext(void 0);function XT(e){const t=ge.useContext(bU);return e||t||"ltr"}var cp="rovingFocusGroup.onEntryFocus",_U={bubbles:!1,cancelable:!0},oh="RovingFocusGroup",[hg,QT,xU]=vU(oh),[EU,eN]=kf(oh,[xU]),[CU,wU]=EU(oh),tN=ge.forwardRef((e,t)=>te.jsx(hg.Provider,{scope:e.__scopeRovingFocusGroup,children:te.jsx(hg.Slot,{scope:e.__scopeRovingFocusGroup,children:te.jsx(TU,{...e,ref:t})})}));tN.displayName=oh;var TU=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...b}=e,C=ge.useRef(null),_=ur(t,C),y=XT(i),[v=null,T]=Bu({prop:a,defaultProp:l,onChange:u}),[O,R]=ge.useState(!1),k=Zi(p),P=QT(n),M=ge.useRef(!1),[Y,X]=ge.useState(0);return ge.useEffect(()=>{const oe=C.current;if(oe)return oe.addEventListener(cp,k),()=>oe.removeEventListener(cp,k)},[k]),te.jsx(CU,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:ge.useCallback(oe=>T(oe),[T]),onItemShiftTab:ge.useCallback(()=>R(!0),[]),onFocusableItemAdd:ge.useCallback(()=>X(oe=>oe+1),[]),onFocusableItemRemove:ge.useCallback(()=>X(oe=>oe-1),[]),children:te.jsx(Mn.div,{tabIndex:O||Y===0?-1:0,"data-orientation":r,...b,ref:_,style:{outline:"none",...e.style},onMouseDown:Sn(e.onMouseDown,()=>{M.current=!0}),onFocus:Sn(e.onFocus,oe=>{const Z=!M.current;if(oe.target===oe.currentTarget&&Z&&!O){const K=new CustomEvent(cp,_U);if(oe.currentTarget.dispatchEvent(K),!K.defaultPrevented){const Q=P().filter(U=>U.focusable),de=Q.find(U=>U.active),pe=Q.find(U=>U.id===v),fe=[de,pe,...Q].filter(Boolean).map(U=>U.ref.current);oN(fe,m)}}M.current=!1}),onBlur:Sn(e.onBlur,()=>R(!1))})})}),nN="RovingFocusGroupItem",rN=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=Nu(),u=i||l,p=wU(nN,n),m=p.currentTabStopId===u,b=QT(n),{onFocusableItemAdd:C,onFocusableItemRemove:_}=p;return ge.useEffect(()=>{if(r)return C(),()=>_()},[r,C,_]),te.jsx(hg.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:te.jsx(Mn.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...a,ref:t,onMouseDown:Sn(e.onMouseDown,y=>{r?p.onItemFocus(u):y.preventDefault()}),onFocus:Sn(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:Sn(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){p.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=OU(y,p.orientation,p.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let O=b().filter(R=>R.focusable).map(R=>R.ref.current);if(v==="last")O.reverse();else if(v==="prev"||v==="next"){v==="prev"&&O.reverse();const R=O.indexOf(y.currentTarget);O=p.loop?AU(O,R+1):O.slice(R+1)}setTimeout(()=>oN(O))}})})})});rN.displayName=nN;var NU={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SU(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OU(e,t,n){const r=SU(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NU[r]}function oN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function AU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RU=tN,$U=rN,Qm="Radio",[DU,iN]=tc(Qm),[kU,MU]=DU(Qm),aN=ge.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,form:p,...m}=e,[b,C]=ge.useState(null),_=ur(t,T=>C(T)),y=ge.useRef(!1),v=b?p||!!b.closest("form"):!0;return te.jsxs(kU,{scope:n,checked:o,disabled:a,children:[te.jsx(Mn.button,{type:"button",role:"radio","aria-checked":o,"data-state":cN(o),"data-disabled":a?"":void 0,disabled:a,value:l,...m,ref:_,onClick:Sn(e.onClick,T=>{o||u==null||u(),v&&(y.current=T.isPropagationStopped(),y.current||T.stopPropagation())})}),v&&te.jsx(PU,{control:b,bubbles:!y.current,name:r,value:l,checked:o,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});aN.displayName=Qm;var sN="RadioIndicator",lN=ge.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=MU(sN,n);return te.jsx(oc,{present:r||i.checked,children:te.jsx(Mn.span,{"data-state":cN(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});lN.displayName=sN;var PU=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=xC(n),l=qg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&b){const C=new Event("click",{bubbles:r});b.call(u,n),u.dispatchEvent(C)}},[a,n,r]),te.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function cN(e){return e?"checked":"unchecked"}var IU=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ey="RadioGroup",[LU,oX]=tc(ey,[eN,iN]),uN=eN(),dN=iN(),[FU,jU]=LU(ey),fN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:p,loop:m=!0,onValueChange:b,...C}=e,_=uN(n),y=XT(p),[v,T]=Bu({prop:i,defaultProp:o,onChange:b});return te.jsx(FU,{scope:n,name:r,required:a,disabled:l,value:v,onValueChange:T,children:te.jsx(RU,{asChild:!0,..._,orientation:u,dir:y,loop:m,children:te.jsx(Mn.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:y,...C,ref:t})})})});fN.displayName=ey;var hN="RadioGroupItem",pN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=jU(hN,n),a=i.disabled||r,l=uN(n),u=dN(n),p=ge.useRef(null),m=ur(t,p),b=i.value===o.value,C=ge.useRef(!1);return ge.useEffect(()=>{const _=v=>{IU.includes(v.key)&&(C.current=!0)},y=()=>C.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",y)}},[]),te.jsx($U,{asChild:!0,...l,focusable:!a,active:b,children:te.jsx(aN,{disabled:a,required:i.required,checked:b,...u,...o,name:i.name,ref:m,onCheck:()=>i.onValueChange(o.value),onKeyDown:Sn(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:Sn(o.onFocus,()=>{var _;C.current&&((_=p.current)==null||_.click())})})})});pN.displayName=hN;var BU="RadioGroupIndicator",gN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=dN(n);return te.jsx(lN,{...o,...r,ref:t})});gN.displayName=BU;var mN=fN,yN=pN,WU=gN;const vN=ge.forwardRef(({className:e,...t},n)=>te.jsx(mN,{className:cr("ve-grid ve-gap-2",e),...t,ref:n}));vN.displayName=mN.displayName;const pg=ge.forwardRef(({className:e,...t},n)=>te.jsx(yN,{ref:n,className:cr("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:te.jsx(WU,{className:"ve-flex ve-items-center ve-justify-center",children:te.jsx($$,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));pg.displayName=yN.displayName;var zU="Label",bN=ge.forwardRef((e,t)=>te.jsx(Mn.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));bN.displayName=zU;var _N=bN;const HU=Tr("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),gg=ge.forwardRef(({className:e,...t},n)=>te.jsx(_N,{ref:n,className:cr(HU(),e),...t}));gg.displayName=_N.displayName;function ty(e){const t=[];return e.fields.forEach(n=>{t.push(GU(e,n))}),te.jsx(te.Fragment,{children:t})}function GU(e,t){return te.jsx(Vn.FieldLabel,{label:t.label,className:"ve-inline-block ve-pt-4",children:te.jsx(Vn.AutoField,{field:{type:t.fieldType},value:e.value[t.field],onChange:n=>{e.onChange({...e.value,[t.field]:n})}})},`constant-${t.field}-label`)}const VU={type:"custom",render:({onChange:e,value:t})=>ty({onChange:e,value:t,fields:[{label:"Alternate Text",field:"alternateText",fieldType:"text"},{label:"URL",field:"url",fieldType:"text"},{label:"Height",field:"height",fieldType:"number"},{label:"Width",field:"width",fieldType:"number"}]})},gb={type:"text"},KU={type:"custom",render:({onChange:e,value:t})=>ty({onChange:e,value:t,fields:[{label:"Line 1",field:"line1",fieldType:"text"},{label:"Line 2",field:"line2",fieldType:"text"},{label:"Line 3",field:"line3",fieldType:"text"},{label:"City",field:"city",fieldType:"text"},{label:"State/Region",field:"region",fieldType:"text"},{label:"Sublocality",field:"sublocality",fieldType:"text"},{label:"Postal Code",field:"postalCode",fieldType:"text"},{label:"Country Code",field:"countryCode",fieldType:"text"}]})},mb="#969696",UU={type:"custom",render:({onChange:e,value:t})=>{const[n,r]=H.useState(t),o=(l,u)=>{const p=[...n];p[l]=u,r(p),e(p)},i=l=>{const u=n.filter((p,m)=>m!==l);r(u),e(u)},a=()=>{r([...n,""])};return te.jsxs("div",{children:[n.map((l,u)=>te.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[te.jsx(Vn.AutoField,{field:{type:"text"},value:l,onChange:p=>o(u,p)}),te.jsx("span",{style:{color:mb},children:te.jsx(Vn.IconButton,{onClick:()=>i(u),variant:"secondary",title:"Delete",disabled:n.length===1,children:te.jsx(F$,{})})})]},u)),te.jsx("span",{style:{color:mb,width:"auto"},children:te.jsx(Vn.Button,{onClick:a,variant:"secondary",icon:te.jsx(P$,{}),fullWidth:!0,children:te.jsx(te.Fragment,{})})})]})}},YU={type:"custom",render:({onChange:e,value:t})=>ty({onChange:e,value:t,fields:[{label:"Label",field:"label",fieldType:"text"},{label:"Link",field:"link",fieldType:"text"}]})},mg=new Ur,qU={"type.string":gb,"type.phone":gb,"type.image":VU,"type.address":KU,"type.cta":YU},ZU=(e,t)=>{if(t)return UU;const n=qU[e];if(!n){mg.log(`No constant configuration for ${e}`);return}return n},JU=(e,t)=>{let n;for(const r of e){const o=ZU(r,t);if(!o){mg.log(`No mapped configuration for ${r}`);return}if(n||(n=o),n!==o){mg.log(`Could not resolve configuration for ${r}`);return}}return n},An=e=>({type:"custom",label:e.label,render:({field:t,value:n,onChange:r})=>{const o=i=>{r({field:(n==null?void 0:n.field)??"",constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:i})};return te.jsxs(te.Fragment,{children:[te.jsx(XU,{constantValueEnabled:n==null?void 0:n.constantValueEnabled,toggleConstantValueEnabled:o}),n!=null&&n.constantValueEnabled?te.jsx(QU,{onChange:r,value:n,filter:e.filter}):te.jsx(e9,{onChange:r,value:n,filter:e.filter,label:t.label})]})}}),XU=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>te.jsx("div",{className:"ve-mb-2 ve-w-full",children:te.jsxs(vN,{defaultValue:(e==null?void 0:e.toString())??"false",children:[te.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[te.jsx(pg,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),te.jsx(gg,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),te.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[te.jsx(pg,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),te.jsx(gg,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),QU=({filter:e,onChange:t,value:n})=>{const r=JU(e.types,!!e.includeListsOnly);return te.jsx(Vn.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:r&&te.jsx(Vn.AutoField,{onChange:o=>t({field:(n==null?void 0:n.field)??"",constantValue:o,constantValueEnabled:!0}),value:n==null?void 0:n.constantValue,field:r})})},e9=({filter:e,onChange:t,value:n,label:r})=>{const o=yU(e);return te.jsx(Vn.FieldLabel,{label:r??"Entity Field",className:"ve-mt-2.5",children:te.jsx(Vn.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...o.map(i=>({label:i.name,value:i.name}))]},onChange:i=>{t({field:i,constantValue:(n==null?void 0:n.constantValue)??"",constantValueEnabled:!1})},value:n==null?void 0:n.field})})},t9=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:n,value:r})=>te.jsxs(Vn.FieldLabel,{label:e,children:[te.jsx(Vn.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:o=>n(o==="default"?"default":t),value:r==="default"?"default":"custom"}),r!=="default"&&te.jsx(Vn.AutoField,{field:{type:"number"},value:r,onChange:n})]})}),n9=[{label:"Default",value:"default",px:""},{label:"XS",value:"xs",px:"12"},{label:"SM",value:"sm",px:"14"},{label:"Base",value:"base",px:"16"},{label:"LG",value:"lg",px:"18"},{label:"XL",value:"xl",px:"20"},{label:"2XL",value:"2xl",px:"24"},{label:"3XL",value:"3xl",px:"30"},{label:"4XL",value:"4xl",px:"36"},{label:"5XL",value:"5xl",px:"48"},{label:"6XL",value:"6xl",px:"60"},{label:"7XL",value:"7xl",px:"72"},{label:"8XL",value:"8xl",px:"96"},{label:"9XL",value:"9xl",px:"128"}],yb=e=>{if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}if(e.endsWith("%")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)/100*t}throw new Error("Unknown font size unit")},r9=(e,t)=>{var r,o;const n=(o=(r=e==null?void 0:e.theme)==null?void 0:r.extend)==null?void 0:o.fontSize[t];return typeof n=="string"?yb(n):Array.isArray(n)&&n.length>0?yb(n[0]):0},o9=(e,t)=>e.map(n=>{const r=r9(t,n.value),o=r?r.toString():n.px;return{label:n.label+(n.px?` (${o}px)`:""),value:n.value}}),co=e=>({type:"custom",render:({value:t,onChange:n})=>{const r=fE();return te.jsx(Vn.FieldLabel,{label:e??"Font Size",icon:te.jsx(em,{size:16}),children:te.jsx(Vn.AutoField,{value:t,onChange:n,field:{type:"select",options:o9(n9,r)}})})}}),xN=Tr("components font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"}}),gc=ge.forwardRef(({className:e,fontSize:t,fontWeight:n,color:r,textTransform:o,...i},a)=>te.jsx("p",{className:xr(xN({fontSize:t,fontWeight:n,color:r,textTransform:o,className:e}),e),ref:a,...i,children:i.children}));gc.displayName="Body";const EN=Tr("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius font-body-fontFamily font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-button-backgroundColor text-button-textColor border-2 border-button-backgroundColor hover:border-button-textColor focus:border-button-textColor active:bg-button-textColor active:text-button-backgroundColor active:border-button-backgroundColor",link:"text-button-textColor underline-offset-4 underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",small:"h-9 px-3",large:"h-11 px-8",icon:"h-10 w-10"},fontSize:{default:"text-button-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},borderRadius:{default:"",none:"rounded-none",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default"}}),ih=ge.forwardRef(({className:e,variant:t,size:n,borderRadius:r,asChild:o=!1,fontSize:i,...a},l)=>{const u=o?xs:"button";return te.jsx(u,{className:xr(EN({variant:t,size:n,borderRadius:r,fontSize:i}),e),ref:l,...a})});ih.displayName="Button";var i9=Object.defineProperty,a9=(e,t,n)=>t in e?i9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t,n)=>a9(e,typeof t!="symbol"?t+"":t,n),vb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function s9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yg={exports:{}},pu={};/**
204
- * @license React
205
- * react-jsx-runtime.production.min.js
206
- *
207
- * Copyright (c) Facebook, Inc. and its affiliates.
208
- *
209
- * This source code is licensed under the MIT license found in the
210
- * LICENSE file in the root directory of this source tree.
211
- */var bb;function l9(){if(bb)return pu;bb=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,b={},C=null,_=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(_=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(b[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)b[m]===void 0&&(b[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:_,props:b,_owner:o.current}}return pu.Fragment=n,pu.jsx=a,pu.jsxs=a,pu}var Gd={};/**
212
- * @license React
213
- * react-jsx-runtime.development.js
214
- *
215
- * Copyright (c) Facebook, Inc. and its affiliates.
216
- *
217
- * This source code is licensed under the MIT license found in the
218
- * LICENSE file in the root directory of this source tree.
219
- */var _b;function c9(){return _b||(_b=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(Ee){if(Ee===null||typeof Ee!="object")return null;var ae=y&&Ee[y]||Ee[v];return typeof ae=="function"?ae:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(Ee){{for(var ae=arguments.length,$e=new Array(ae>1?ae-1:0),je=1;je<ae;je++)$e[je-1]=arguments[je];k("error",Ee,$e)}}function k(Ee,ae,$e){{var je=O.ReactDebugCurrentFrame,at=je.getStackAddendum();at!==""&&(ae+="%s",$e=$e.concat([at]));var xt=$e.map(function(bt){return String(bt)});xt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Ee],console,xt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function K(Ee){return!!(typeof Ee=="string"||typeof Ee=="function"||Ee===r||Ee===i||oe||Ee===o||Ee===p||Ee===m||X||Ee===_||P||M||Y||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===C||Ee.$$typeof===b||Ee.$$typeof===a||Ee.$$typeof===l||Ee.$$typeof===u||Ee.$$typeof===Z||Ee.getModuleId!==void 0))}function Q(Ee,ae,$e){var je=Ee.displayName;if(je)return je;var at=ae.displayName||ae.name||"";return at!==""?$e+"("+at+")":$e}function de(Ee){return Ee.displayName||"Context"}function pe(Ee){if(Ee==null)return null;if(typeof Ee.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ee=="function")return Ee.displayName||Ee.name||null;if(typeof Ee=="string")return Ee;switch(Ee){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof Ee=="object")switch(Ee.$$typeof){case l:var ae=Ee;return de(ae)+".Consumer";case a:var $e=Ee;return de($e._context)+".Provider";case u:return Q(Ee,Ee.render,"ForwardRef");case b:var je=Ee.displayName||null;return je!==null?je:pe(Ee.type)||"Memo";case C:{var at=Ee,xt=at._payload,bt=at._init;try{return pe(bt(xt))}catch{return null}}}return null}var ne=Object.assign,fe=0,U,j,ee,re,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){U=console.log,j=console.info,ee=console.warn,re=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var Ee={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:Ee,log:Ee,warn:Ee,error:Ee,group:Ee,groupCollapsed:Ee,groupEnd:Ee})}fe++}}function N(){{if(fe--,fe===0){var Ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},Ee,{value:U}),info:ne({},Ee,{value:j}),warn:ne({},Ee,{value:ee}),error:ne({},Ee,{value:re}),group:ne({},Ee,{value:B}),groupCollapsed:ne({},Ee,{value:W}),groupEnd:ne({},Ee,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(Ee,ae,$e){{if(q===void 0)try{throw Error()}catch(at){var je=at.stack.trim().match(/\n( *(at )?)/);q=je&&je[1]||""}return`
220
- `+q+Ee}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(Ee,ae){if(!Ee||he)return"";{var $e=se.get(Ee);if($e!==void 0)return $e}var je;he=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xt;xt=I.current,I.current=null,w();try{if(ae){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(Cn){je=Cn}Reflect.construct(Ee,[],bt)}else{try{bt.call()}catch(Cn){je=Cn}Ee.call(bt.prototype)}}else{try{throw Error()}catch(Cn){je=Cn}Ee()}}catch(Cn){if(Cn&&je&&typeof Cn.stack=="string"){for(var ht=Cn.stack.split(`
221
- `),At=je.stack.split(`
222
- `),Kt=ht.length-1,Mt=At.length-1;Kt>=1&&Mt>=0&&ht[Kt]!==At[Mt];)Mt--;for(;Kt>=1&&Mt>=0;Kt--,Mt--)if(ht[Kt]!==At[Mt]){if(Kt!==1||Mt!==1)do if(Kt--,Mt--,Mt<0||ht[Kt]!==At[Mt]){var Yt=`
223
- `+ht[Kt].replace(" at new "," at ");return Ee.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",Ee.displayName)),typeof Ee=="function"&&se.set(Ee,Yt),Yt}while(Kt>=1&&Mt>=0);break}}}finally{he=!1,I.current=xt,N(),Error.prepareStackTrace=at}var mn=Ee?Ee.displayName||Ee.name:"",Cr=mn?ue(mn):"";return typeof Ee=="function"&&se.set(Ee,Cr),Cr}function Be(Ee,ae,$e){return Oe(Ee,!1)}function ce(Ee){var ae=Ee.prototype;return!!(ae&&ae.isReactComponent)}function le(Ee,ae,$e){if(Ee==null)return"";if(typeof Ee=="function")return Oe(Ee,ce(Ee));if(typeof Ee=="string")return ue(Ee);switch(Ee){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof Ee=="object")switch(Ee.$$typeof){case u:return Be(Ee.render);case b:return le(Ee.type,ae,$e);case C:{var je=Ee,at=je._payload,xt=je._init;try{return le(xt(at),ae,$e)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Pe.setExtraStackFrame($e)}else Pe.setExtraStackFrame(null)}function Xe(Ee,ae,$e,je,at){{var xt=Function.call.bind(ve);for(var bt in Ee)if(xt(Ee,bt)){var ht=void 0;try{if(typeof Ee[bt]!="function"){var At=Error((je||"React class")+": "+$e+" type `"+bt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ee[bt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw At.name="Invariant Violation",At}ht=Ee[bt](ae,bt,je,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Kt){ht=Kt}ht&&!(ht instanceof Error)&&(We(at),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",$e,bt,typeof ht),We(null)),ht instanceof Error&&!(ht.message in Me)&&(Me[ht.message]=!0,We(at),R("Failed %s type: %s",$e,ht.message),We(null))}}}var st=Array.isArray;function dt(Ee){return st(Ee)}function Ct(Ee){{var ae=typeof Symbol=="function"&&Symbol.toStringTag,$e=ae&&Ee[Symbol.toStringTag]||Ee.constructor.name||"Object";return $e}}function Se(Ee){try{return me(Ee),!1}catch{return!0}}function me(Ee){return""+Ee}function _e(Ee){if(Se(Ee))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(Ee)),me(Ee)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(Ee){if(ve.call(Ee,"ref")){var ae=Object.getOwnPropertyDescriptor(Ee,"ref").get;if(ae&&ae.isReactWarning)return!1}return Ee.ref!==void 0}function Et(Ee){if(ve.call(Ee,"key")){var ae=Object.getOwnPropertyDescriptor(Ee,"key").get;if(ae&&ae.isReactWarning)return!1}return Ee.key!==void 0}function Bt(Ee,ae){if(typeof Ee.ref=="string"&&De.current&&ae&&De.current.stateNode!==ae){var $e=pe(De.current.type);tt[$e]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),Ee.ref),tt[$e]=!0)}}function Qe(Ee,ae){{var $e=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"key",{get:$e,configurable:!0})}}function et(Ee,ae){{var $e=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"ref",{get:$e,configurable:!0})}}var lt=function(Ee,ae,$e,je,at,xt,bt){var ht={$$typeof:t,type:Ee,key:ae,ref:$e,props:bt,_owner:xt};return ht._store={},Object.defineProperty(ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(ht.props),Object.freeze(ht)),ht};function wt(Ee,ae,$e,je,at){{var xt,bt={},ht=null,At=null;$e!==void 0&&(_e($e),ht=""+$e),Et(ae)&&(_e(ae.key),ht=""+ae.key),ut(ae)&&(At=ae.ref,Bt(ae,at));for(xt in ae)ve.call(ae,xt)&&!Fe.hasOwnProperty(xt)&&(bt[xt]=ae[xt]);if(Ee&&Ee.defaultProps){var Kt=Ee.defaultProps;for(xt in Kt)bt[xt]===void 0&&(bt[xt]=Kt[xt])}if(ht||At){var Mt=typeof Ee=="function"?Ee.displayName||Ee.name||"Unknown":Ee;ht&&Qe(bt,Mt),At&&et(bt,Mt)}return lt(Ee,ht,At,at,je,De.current,bt)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Rt.setExtraStackFrame($e)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===t}function kt(){{if(_t.current){var Ee=pe(_t.current.type);if(Ee)return`
224
-
225
- Check the render method of \``+Ee+"`."}return""}}function Dt(Ee){return""}var Vt={};function sn(Ee){{var ae=kt();if(!ae){var $e=typeof Ee=="string"?Ee:Ee.displayName||Ee.name;$e&&(ae=`
226
-
227
- Check the top-level render call using <`+$e+">.")}return ae}}function fr(Ee,ae){{if(!Ee._store||Ee._store.validated||Ee.key!=null)return;Ee._store.validated=!0;var $e=sn(ae);if(Vt[$e])return;Vt[$e]=!0;var je="";Ee&&Ee._owner&&Ee._owner!==_t.current&&(je=" It was passed a child from "+pe(Ee._owner.type)+"."),qe(Ee),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,je),qe(null)}}function Nr(Ee,ae){{if(typeof Ee!="object")return;if(dt(Ee))for(var $e=0;$e<Ee.length;$e++){var je=Ee[$e];yt(je)&&fr(je,ae)}else if(yt(Ee))Ee._store&&(Ee._store.validated=!0);else if(Ee){var at=T(Ee);if(typeof at=="function"&&at!==Ee.entries)for(var xt=at.call(Ee),bt;!(bt=xt.next()).done;)yt(bt.value)&&fr(bt.value,ae)}}}function Qo(Ee){{var ae=Ee.type;if(ae==null||typeof ae=="string")return;var $e;if(typeof ae=="function")$e=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===u||ae.$$typeof===b))$e=ae.propTypes;else return;if($e){var je=pe(ae);Xe($e,Ee.props,"prop",je,Ee)}else if(ae.PropTypes!==void 0&&!ot){ot=!0;var at=pe(ae);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ia(Ee){{for(var ae=Object.keys(Ee.props),$e=0;$e<ae.length;$e++){var je=ae[$e];if(je!=="children"&&je!=="key"){qe(Ee),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),qe(null);break}}Ee.ref!==null&&(qe(Ee),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function Sr(Ee,ae,$e,je,at,xt){{var bt=K(Ee);if(!bt){var ht="";(Ee===void 0||typeof Ee=="object"&&Ee!==null&&Object.keys(Ee).length===0)&&(ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var At=Dt();At?ht+=At:ht+=kt();var Kt;Ee===null?Kt="null":dt(Ee)?Kt="array":Ee!==void 0&&Ee.$$typeof===t?(Kt="<"+(pe(Ee.type)||"Unknown")+" />",ht=" Did you accidentally export a JSX literal instead of a component?"):Kt=typeof Ee,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Kt,ht)}var Mt=wt(Ee,ae,$e,at,xt);if(Mt==null)return Mt;if(bt){var Yt=ae.children;if(Yt!==void 0)if(je)if(dt(Yt)){for(var mn=0;mn<Yt.length;mn++)Nr(Yt[mn],Ee);Object.freeze&&Object.freeze(Yt)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Nr(Yt,Ee)}return Ee===r?ia(Mt):Qo(Mt),Mt}}function Zn(Ee,ae,$e){return Sr(Ee,ae,$e,!0)}function Er(Ee,ae,$e){return Sr(Ee,ae,$e,!1)}var po=Er,aa=Zn;Gd.Fragment=r,Gd.jsx=po,Gd.jsxs=aa}()),Gd}process.env.NODE_ENV==="production"?yg.exports=l9():yg.exports=c9();var an=yg.exports;function u9(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const d9={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},xb={GOOGLE:"google",APPLE:"apple",BING:"bing"},f9=(e,t)=>{const n={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return n&&t[n]},CN=(e,t=[],n,r={route:!1},o)=>{const i="Failed to construct query for maps service.";let a=e&&Tb([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case xb.APPLE:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Eb(`${o.latitude},${o.longitude}`,r.route);if(!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return Eb(a,r.route)}case xb.BING:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Cb(`${o.latitude},${o.longitude}`,r.route);if(a=e&&Tb([e.line1,e.city,e.region,e.postalCode]),!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return Cb(a,r.route)}default:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return wb(`${o.latitude},${o.longitude}`,r.route);const l=t.find(u=>{var p;return((p=u==null?void 0:u.publisher)==null?void 0:p.toUpperCase())===d9.GOOGLEMYBUSINESS});if(l!=null&&l.listingUrl)return l.listingUrl;if(!a){console.warn(`${i} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return wb(a,r.route)}}},Eb=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,Cb=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,wb=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,Tb=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},h9=({address:e,lines:t,separator:n=",",...r})=>{const o=(t||u9(e.countryCode)).map(i=>an.jsx(p9,{address:e,line:i,separator:n},i.toString()));return H.createElement("div",{...r,key:e.toString()},o)},p9=({address:e,line:t,separator:n})=>{const r=[];for(const o of t){if(o===","){r.push(an.jsx("span",{children:n},o));continue}const i=e[o];if(!i)continue;const a=f9(o,e);if(a){r.push(an.jsxs(ge.Fragment,{children:[" ",an.jsx("abbr",{title:a,children:i})]},o));continue}r.push(an.jsx("span",{children:" "+i},o))}return an.jsx("div",{className:"address-line",children:r})};var mc={};Object.defineProperty(mc,"__esModule",{value:!0});var g9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m9=typeof window<"u"&&typeof window.document<"u",y9=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,v9=(typeof self>"u"?"undefined":g9(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",b9=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),_9=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Nb=mc.isBrowser=m9;mc.isWebWorker=v9;var x9=mc.isNode=y9;mc.isJsDom=b9;var E9=mc.isDeno=_9;class C9{constructor(){lo(this,"name"),lo(this,"isServerSide"),lo(this,"version");var t;E9?(this.name="deno",this.version="",Nb&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):x9?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Nb?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const wN=()=>new C9,w9=H.createContext(null);H.lazy(()=>Promise.resolve().then(()=>require("./debugger-C-GK2f4q-CnI6NuTH.cjs")));const T9=H.createContext({name:""}),N9=()=>H.useContext(T9).name;function S9(){const e=H.useContext(w9);if(!e)return e;wN().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=N9();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const ys={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},O9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const o=e.pathname.replace(/^\//,"").split("/");if(o.length<2||o.length>3){console.error(`Invalid path: ${e}`);return}let i;if(o[0]==="f")i="prod";else switch(o[0].replace("f-","")){case"sandbox":{i="sbx";break}case"qa":{i="qa";break}case"dev":{i="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(i==="dev"||i==="sbx")){console.error(`Invalid path: ${e}`);return}let a;if(o.length===3&&(a=parseInt(o[1]),Number.isNaN(a))){console.error(`Invalid account id: ${e}`);return}const l=o[o.length-1].split("."),u=l.length===2?`.${l[1]}`:"",p=l[0];return{scheme:t,partition:r,env:i,accountId:a,contentHash:p,extension:u}},A9=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let o="f";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}const i=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${o}/${i}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},R9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const o=n[1];let i;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(i=parseFloat(n[2]),Number.isNaN(i)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const a=n[n.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:t,env:r,contentHash:o,aspectRatio:i,name:u,extension:l}},$9=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let o="p";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}return`${r}/${o}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},vg=(e,t,n)=>{if(!TN(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const o=R9(r);if(o)return $9(o,t,n)}else if(r.pathname.startsWith("/f")){const o=O9(r);if(o)return A9(o,t,n)}return e},TN=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},ah=({image:e,className:t,width:n,height:r,aspectRatio:o,layout:i=ys.INTRINSIC,placeholder:a,imgOverrides:l,style:u={},loading:p="lazy"})=>{const m=H.useRef(null),[b,C]=H.useState(!1),_="image"in e?e.image:e;H.useEffect(()=>{var oe;(oe=m.current)!=null&&oe.complete&&C(!0)},[]),D9(i,_.width,_.height,n,r,o);const y=Math.abs(_.width);y||console.warn("Invalid image width.");const v=Math.abs(_.height);if(v||console.warn("Invalid image height."),!TN(_.url))return console.error(`Invalid image url: ${_.url}`),an.jsx(an.Fragment,{children:a!=null&&a});const T=n&&n>0?n:void 0,O=r&&r>0?r:void 0,{src:R,imgStyle:k,widths:P}=k9(i,y,v,u,_.url,T,O,o),M=P.map(oe=>`${vg(_.url,oe,v/y*oe)} ${oe}w`).join(", "),Y=[640,768,1024,1280,1536],X=P.map((oe,Z)=>Z===P.length-1?`${oe}px`:`(max-width: ${Y[Z]}px) ${oe}px`).join(", ");return an.jsxs(an.Fragment,{children:[!b&&a!=null&&a,an.jsx("img",{ref:m,style:k,src:R,className:t,width:T,height:O,srcSet:M,sizes:X,loading:p,alt:_.alternateText||"",...l})]})},D9=(e,t,n,r,o,i)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===ys.FIXED){if(!r&&!o){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),o&&o<0&&console.warn(`Using fixed layout but height is invalid: ${o}.`);return}(r||o)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===ys.ASPECT&&!i&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},k9=(e,t,n,r,o,i,a,l)=>{let u=[100,320,640,960,1280,1920],p=vg(o,500,500);const m={...r};switch(m.objectFit=m.objectFit||"cover",m.objectPosition=m.objectPosition||"center",e){case ys.INTRINSIC:m.maxWidth=t,m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FIXED:{const{fixedWidth:b,fixedHeight:C,fixedWidths:_}=M9(t,n,u,i,a);m.width=b,m.height=C,u=_,p=vg(o,b,C);break}case ys.ASPECT:m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FILL:m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:p,imgStyle:m,widths:u}},M9=(e,t,n,r,o)=>r&&o?{fixedWidth:r,fixedHeight:o,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:o?{fixedWidth:o/t*e,fixedHeight:o,fixedWidths:[o/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var NN={exports:{}};/*!
228
- Copyright (c) 2018 Jed Watson.
229
- Licensed under the MIT License (MIT), see
230
- http://jedwatson.github.io/classnames
231
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(NN);var P9=NN.exports;const Pu=s9(P9),Sb=e=>e.linkType==="Email"||!e.linkType&&SN(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,SN=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),I9=e=>"href"in e,Zu=H.forwardRef(function(e,t){const n=I9(e)?{link:e.href}:e.cta,{children:r,onClick:o,className:i,eventName:a,scope:l,currency:u,amount:p,cta:m,obfuscate:b,customTags:C,customValues:_,...y}=e,v=m?"CTA_CLICK":"LINK",T=a||(m?"cta":"link"),O=S9();if(!(n!=null&&n.link))throw new Error("CTA's link is undefined");const R=b||b!==!1&&SN(n.link),k=async Y=>{const X=Y.currentTarget;let oe="";if(R){Y.preventDefault();const Z=X.href.split("/").at(-1);Z&&(oe=atob(Z))}if(O!==null)try{await O.track({action:v,scope:e.scope,eventName:T,currency:u,amount:p,destinationUrl:oe||X.href,customTags:C,customValues:_})}catch{console.error("Failed to report click Analytics Event")}o&&o(Y),oe&&(window.location.href=oe)},P=R?"Obfuscated, set a label or child":n.link,M={className:Pu("Link",i),href:R?btoa(Sb(n)):Sb(n),onClick:k,rel:e.target&&!e.rel?"noopener":void 0,ref:t};return O!=null&&O.getDebugEnabled()&&(M["data-ya-action"]=v,M["data-ya-scopeoverride"]=l,M["data-ya-eventname"]=T),an.jsx("a",{...M,...y,suppressHydrationWarning:!0,children:r||n.label||P})}),_r=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),Vd=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),up=3959,dp=6371,L9=["latitude","lat"],F9=["longitude","lon","lng","long"];function Ob(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Ab(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function vs(e){return e*Math.PI/180}function Ki(e){return e/Math.PI*180}function j9(e,t){const n=vs(e.latitude),r=vs(t.latitude),o=r-n,i=vs(t.longitude-e.longitude),a=Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(i/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function B9(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function W9(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(n)*360/Math.PI-90}class yc{constructor(t,n){let r=t;typeof t=="object"&&(r=Ob(t,L9),n=Ob(t,F9),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(t){this._lat=Math.max(-90,Math.min(Ab(t),90))}set longitude(t){this._lon=Ab(t)}add(t,n,r=_r.DEGREE,o=Vd.SPHERICAL){if(o===Vd.MERCATOR&&(r===_r.DEGREE||r===_r.RADIAN)){const i=r===_r.DEGREE?vs(t):t,a=r===_r.DEGREE?n:Ki(n);this.latitude=W9(this.latitude,i),this.longitude+=a}else switch(r){case _r.DEGREE:this.latitude+=t,this.longitude+=n;break;case _r.KILOMETER:this.latitude+=Ki(t)*dp,this.longitude+=Ki(n)*dp*Math.cos(vs(this.latitude));break;case _r.MILE:this.latitude+=Ki(t)*up,this.longitude+=Ki(n)*up*Math.cos(vs(this.latitude));break;case _r.RADIAN:this.latitude+=Ki(t),this.longitude+=Ki(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(t,n=_r.MILE,r=Vd.SPHERICAL){if(r===Vd.MERCATOR&&(n===_r.DEGREE||n===_r.RADIAN)){const o=B9(this.latitude,t.latitude),i=Math.abs(t.normalLon-this.normalLon),a=vs(Math.min(i,360-i)),l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));switch(n){case _r.DEGREE:return Ki(l);case _r.RADIAN:return l;default:throw new Error(`unit unhandled: ${n}`)}}else{const o=j9(this,t);switch(n){case _r.DEGREE:return Ki(o);case _r.KILOMETER:return o*dp;case _r.MILE:return o*up;case _r.RADIAN:return o;default:throw new Error(`unit unhandled: ${n}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function ON(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}const Vl={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Kl(e,t){if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Jl(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class z9{constructor(t,n){Jl(t,ry),Jl(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Kl(t,Vl.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Kl(t,Vl.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class vc{constructor(t){Jl(t,z9),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class H9{constructor(t){Jl(t,ry),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(t){return Kl(t,Vl.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Kl(t,Vl.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Kl(t,Vl.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}build(){const t=this.providerPinClass;return new t(this)}}class ny{constructor(t){Jl(t,H9),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const G9=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class sh extends ny{static get baseStyle(){return G9}constructor(t){super(t),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const n=t.getClass(),r=t.getElement()||this._pinEl,o=t.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=o,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(t){const n=t.getAnchorX(),r=t.getAnchorY(),o=t.getHeight(),i=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:o+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class Ps{constructor(){this.loadFunction=(t,n,r,o)=>t(),this.mapClass=vc,this.pinClass=ny,this.providerName=""}withLoadFunction(t){return Kl(t,Vl.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new ry(this)}}class ry{constructor(t){Jl(t,Ps),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}const Rb={GEOCODER:"geocoder",PLACES:"places"};class V9 extends vc{constructor(t){super(t),this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new yc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new google.maps.LatLng(t.latitude,t.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(t,n){this.map.setZoom(Math.floor(t))}setZoomCenter(t,n,r){this.setCenter(n,r),this.setZoom(t,r)}}class K9 extends sh{constructor(t){super(t),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var i;const a=(i=this.getProjection())==null?void 0:i.fromLatLngToDivPixel(n._latLng);a&&(n._wrapper.style.left=a.x+"px",n._wrapper.style.top=a.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var i;(i=n._wrapper.parentNode)==null||i.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,n){this.pin.setMap(t?t.getProviderMap().map:null)}}const $b="GoogleMapsCallback_b7d77ff2",U9="https://maps.googleapis.com/maps/api/js";function Y9(e,t,n,{autocomplete:r=!1,channel:o=window.location.hostname,client:i,language:a,region:l,libraries:u=[],loading:p="async",params:m={}}={}){window[$b]=e,r&&u.push(Rb.GEOCODER,Rb.PLACES);const b={callback:$b,channel:o,libraries:u.join(","),...m};n&&(b.key=n),i&&(b.client=i),a&&(b.language=a),l&&(b.region=l),p&&(b.loading=p),ON(U9+"?"+Object.entries(b).map(([C,_])=>C+"="+_).join("&"))}new Ps().withLoadFunction(Y9).withMapClass(V9).withPinClass(K9).withProviderName("Google").build();H.createContext(null);H.createContext(null);var fp={},gu={},Db;function q9(){if(Db)return gu;Db=1;var e=H;const t=e.createContext(null);function n(o,i){let a=null;o!=null&&(a=o[1]);function l(){return i??(a!=null?a.getTheme():null)}return{getTheme:l}}function r(){const o=e.useContext(t);if(o==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return o}return gu.LexicalComposerContext=t,gu.createLexicalComposerContext=n,gu.useLexicalComposerContext=r,gu}var mu={},kb;function Z9(){if(kb)return mu;kb=1;var e=H;function t(r){let o=new URLSearchParams;o.append("code",r);for(let i=1;i<arguments.length;i++)o.append("v",arguments[i]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${o} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return mu.LexicalComposerContext=n,mu.createLexicalComposerContext=function(r,o){let i=null;return r!=null&&(i=r[1]),{getTheme:function(){return o??(i!=null?i.getTheme():null)}}},mu.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},mu}var Mb,Pb;function dr(){return Pb||(Pb=1,Mb=process.env.NODE_ENV==="development"?q9():Z9()),Mb}var Ve={},Ib;function J9(){if(Ib)return Ve;Ib=1;function e(g){return{type:g}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("CLICK_COMMAND"),r=e("DELETE_CHARACTER_COMMAND"),o=e("INSERT_LINE_BREAK_COMMAND"),i=e("INSERT_PARAGRAPH_COMMAND"),a=e("CONTROLLED_TEXT_INSERTION_COMMAND"),l=e("PASTE_COMMAND"),u=e("REMOVE_TEXT_COMMAND"),p=e("DELETE_WORD_COMMAND"),m=e("DELETE_LINE_COMMAND"),b=e("FORMAT_TEXT_COMMAND"),C=e("UNDO_COMMAND"),_=e("REDO_COMMAND"),y=e("KEYDOWN_COMMAND"),v=e("KEY_ARROW_RIGHT_COMMAND"),T=e("MOVE_TO_END"),O=e("KEY_ARROW_LEFT_COMMAND"),R=e("MOVE_TO_START"),k=e("KEY_ARROW_UP_COMMAND"),P=e("KEY_ARROW_DOWN_COMMAND"),M=e("KEY_ENTER_COMMAND"),Y=e("KEY_SPACE_COMMAND"),X=e("KEY_BACKSPACE_COMMAND"),oe=e("KEY_ESCAPE_COMMAND"),Z=e("KEY_DELETE_COMMAND"),K=e("KEY_TAB_COMMAND"),Q=e("INSERT_TAB_COMMAND"),de=e("INDENT_CONTENT_COMMAND"),pe=e("OUTDENT_CONTENT_COMMAND"),ne=e("DROP_COMMAND"),fe=e("FORMAT_ELEMENT_COMMAND"),U=e("DRAGSTART_COMMAND"),j=e("DRAGOVER_COMMAND"),ee=e("DRAGEND_COMMAND"),re=e("COPY_COMMAND"),B=e("CUT_COMMAND"),W=e("SELECT_ALL_COMMAND"),J=e("CLEAR_EDITOR_COMMAND"),F=e("CLEAR_HISTORY_COMMAND"),w=e("CAN_REDO_COMMAND"),N=e("CAN_UNDO_COMMAND"),I=e("FOCUS_COMMAND"),q=e("BLUR_COMMAND"),ue=e("KEY_MODIFIER_COMMAND"),he=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=he&&"documentMode"in document?document.documentMode:null,Ce=he&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Oe=he&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Be=he&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ce=he&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),le=he&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ve=he&&/Android/.test(navigator.userAgent),Me=he&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Pe=he&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Me,We=1,Xe=3,st=0,dt=1,Ct=2,Se=0,me=1,_e=2,De=1,Fe=2,ke=4,ze=8,tt=16,ut=32,Et=64,Bt=128,Qe=De|Fe|ke|ze|tt|ut|Et|Bt,et=1,lt=2,wt=1,_t=2,Rt=3,qe=4,ot=5,yt=6,kt=" ",Dt=ce||le||Pe?kt:"​",Vt=`
232
-
233
- `,sn=Oe?kt:Dt,fr="֑-߿יִ-﷽ﹰ-ﻼ",Nr="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Qo=new RegExp("^[^"+Nr+"]*["+fr+"]"),ia=new RegExp("^[^"+fr+"]*["+Nr+"]"),Sr={bold:De,code:tt,highlight:Bt,italic:Fe,strikethrough:ke,subscript:ut,superscript:Et,underline:ze},Zn={directionless:et,unmergeable:lt},Er={center:_t,end:yt,justify:qe,left:wt,right:Rt,start:ot},po={[_t]:"center",[yt]:"end",[qe]:"justify",[wt]:"left",[Rt]:"right",[ot]:"start"},aa={normal:Se,segmented:_e,token:me},Ee={[Se]:"normal",[_e]:"segmented",[me]:"token"},ae=100;let $e=!1,je=0;function at(){return $e}function xt(g){je=g.timeStamp}function bt(g){je===0&&Ro(g).addEventListener("textInput",xt,!0)}function ht(g,c,h){return c.__lexicalLineBreak===g||g[`__lexicalKey_${h._key}`]!==void 0}function At(g){return g.getEditorState().read(()=>{const c=_n();return c!==null?c.clone():null})}function Kt(g,c,h){const E=Wr(h._window);let S=null,$=null;E!==null&&E.anchorNode===g&&(S=E.anchorOffset,$=E.focusOffset);const G=g.nodeValue;G!==null&&Gs(c,G,S,$,!1)}function Mt(g,c,h){if(Tt(g)){const E=g.anchor.getNode();if(E.is(h)&&g.format!==E.getFormat())return!1}return c.nodeType===Xe&&h.isAttached()}function Yt(g,c,h){$e=!0;const E=performance.now()-je>ae;try{ro(g,()=>{const S=_n()||At(g),$=new Map,G=g.getRootElement(),V=g._editorState,be=g._blockCursorElement;let ye=!1,Ne="";for(let Ae=0;Ae<c.length;Ae++){const Te=c[Ae],He=Te.type,Le=Te.target;let Je=Qr(Le,V);if(!(Je===null&&Le!==G||zn(Je))){if(He==="characterData")E&&St(Je)&&Mt(S,Le,Je)&&Kt(Le,Je,g);else if(He==="childList"){ye=!0;const ft=Te.addedNodes;for(let Ht=0;Ht<ft.length;Ht++){const Pt=ft[Ht],Zt=Bs(Pt),jt=Pt.parentNode;if(jt!=null&&Pt!==be&&Zt===null&&(Pt.nodeName!=="BR"||!ht(Pt,jt,g))){if(Oe){const Jt=Pt.innerText||Pt.nodeValue;Jt&&(Ne+=Jt)}jt.removeChild(Pt)}}const Ye=Te.removedNodes,Ft=Ye.length;if(Ft>0){let Ht=0;for(let Pt=0;Pt<Ft;Pt++){const Zt=Ye[Pt];(Zt.nodeName==="BR"&&ht(Zt,Le,g)||be===Zt)&&(Le.appendChild(Zt),Ht++)}Ft!==Ht&&(Le===G&&(Je=zs(V)),$.set(Le,Je))}}}}if($.size>0)for(const[Ae,Te]of $)if(rt(Te)){const He=Te.getChildrenKeys();let Le=Ae.firstChild;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=g.getElementByKey(ft);Ye!==null&&(Le==null?(Ae.appendChild(Ye),Le=Ye):Le!==Ye&&Ae.replaceChild(Ye,Le),Le=Le.nextSibling)}}else St(Te)&&Te.markDirty();const we=h.takeRecords();if(we.length>0){for(let Ae=0;Ae<we.length;Ae++){const Te=we[Ae],He=Te.addedNodes,Le=Te.target;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=ft.parentNode;Ye!=null&&ft.nodeName==="BR"&&!ht(ft,Le,g)&&Ye.removeChild(ft)}}h.takeRecords()}S!==null&&(ye&&(S.dirty=!0,gr(S)),Oe&&ni(g)&&S.insertRawText(Ne))})}finally{$e=!1}}function mn(g){const c=g._observer;if(c!==null){const h=c.takeRecords();Yt(g,h,c)}}function Cr(g){bt(g),g._observer=new MutationObserver((c,h)=>{Yt(g,c,h)})}function Cn(g,c){const h=g.__mode,E=g.__format,S=g.__style,$=c.__mode,G=c.__format,V=c.__style;return(h===null||h===$)&&(E===null||E===G)&&(S===null||S===V)}function Jn(g,c){const h=g.mergeWithSibling(c),E=Dn()._normalizedNodes;return E.add(g.__key),E.add(c.__key),h}function Ir(g){let c=g;if(c.__text===""&&c.isSimpleText()&&!c.isUnmergeable()){c.remove();return}let h;for(;(h=c.getPreviousSibling())!==null&&St(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(Cn(h,c)){c=Jn(h,c);break}else break;let E;for(;(E=c.getNextSibling())!==null&&St(E)&&E.isSimpleText()&&!E.isUnmergeable();)if(E.__text==="")E.remove();else if(Cn(c,E)){c=Jn(c,E);break}else break}function sa(g){return ei(g.anchor),ei(g.focus),g}function ei(g){for(;g.type==="element";){const c=g.getNode(),h=g.offset;let E,S;if(h===c.getChildrenSize()?(E=c.getChildAtIndex(h-1),S=!0):(E=c.getChildAtIndex(h),S=!1),St(E)){g.set(E.__key,S?E.getTextContentSize():0,"text");break}else if(!rt(E))break;g.set(E.__key,S?E.getChildrenSize():0,"element")}}let Cc=1;function wc(){return""+Cc++}function Tc(g,c){const h=g._nodes.get(c);if(h===void 0)throw Error(`registeredNode: Type ${c} not found`);return h}const go=typeof queueMicrotask=="function"?queueMicrotask:g=>{Promise.resolve().then(g)};function Fs(g){return zn(Qr(g))}function Nc(g){const c=document.activeElement;if(c===null)return!1;const h=c.nodeName;return zn(Qr(g))&&(h==="INPUT"||h==="TEXTAREA"||c.contentEditable==="true"&&c.__lexicalEditor==null)}function ti(g,c,h){const E=g.getRootElement();try{return E!==null&&E.contains(c)&&E.contains(h)&&c!==null&&!Nc(c)&&Si(c)===g}catch{return!1}}function Si(g){let c=g;for(;c!=null;){const h=c.__lexicalEditor;if(h!=null)return h;c=Us(c)}return null}function Sc(g){return Qo.test(g)?"rtl":ia.test(g)?"ltr":null}function js(g){return g.isToken()||g.isSegmented()}function hh(g){return g.nodeType===Xe}function Rn(g){let c=g;for(;c!=null;){if(hh(c))return c;c=c.firstChild}return null}function er(g,c,h){const E=Sr[c];if(h!==null&&(g&E)===(h&E))return g;let S=g^E;return c==="subscript"?S&=~Sr.superscript:c==="superscript"&&(S&=~Sr.subscript),S}function No(g){return St(g)||ko(g)||zn(g)}function So(g,c){if(c!=null){g.__key=c;return}$r(),Ry();const h=Dn(),E=fi(),S=wc();E._nodeMap.set(S,g),rt(g)?h._dirtyElements.set(S,!0):h._dirtyLeaves.add(S),h._cloneNotNeeded.add(S),h._dirtyType=dt,g.__key=S}function hr(g,c,h){let E=g;for(;E!==null;){if(h.has(E))return;const S=c.get(E);if(S===void 0)break;h.set(E,!1),E=S.__parent}}function Jr(g){const c=g.getParent();if(c!==null){const h=g.getWritable(),E=c.getWritable(),S=g.getPreviousSibling(),$=g.getNextSibling();if(S===null)if($!==null){const G=$.getWritable();E.__first=$.__key,G.__prev=null}else E.__first=null;else{const G=S.getWritable();if($!==null){const V=$.getWritable();V.__prev=G.__key,G.__next=V.__key}else G.__next=null;h.__prev=null}if($===null)if(S!==null){const G=S.getWritable();E.__last=S.__key,G.__next=null}else E.__last=null;else{const G=$.getWritable();if(S!==null){const V=S.getWritable();V.__next=G.__key,G.__prev=V.__key}else G.__prev=null;h.__next=null}E.__size--,h.__parent=null}}function Ga(g){Ry();const c=g.getLatest(),h=c.__parent,E=fi(),S=Dn(),$=E._nodeMap,G=S._dirtyElements;h!==null&&hr(h,$,G);const V=c.__key;S._dirtyType=dt,rt(g)?G.set(V,!0):S._dirtyLeaves.add(V)}function Oc(g){const c=g.getPreviousSibling(),h=g.getNextSibling();c!==null&&Ga(c),h!==null&&Ga(h)}function Pn(g){$r();const c=Dn(),h=c._compositionKey;if(g!==h){if(c._compositionKey=g,h!==null){const E=Fn(h);E!==null&&E.getWritable()}if(g!==null){const E=Fn(g);E!==null&&E.getWritable()}}}function Xr(){return ul()?null:Dn()._compositionKey}function Fn(g,c){const h=(c||fi())._nodeMap.get(g);return h===void 0?null:h}function Bs(g,c){const h=Dn(),E=g[`__lexicalKey_${h._key}`];return E!==void 0?Fn(E,c):null}function Qr(g,c){let h=g;for(;h!=null;){const E=Bs(h,c);if(E!==null)return E;h=Us(h)}return null}function Oo(g){const c=g._decorators,h=Object.assign({},c);return g._pendingDecorators=h,h}function Ws(g){return g.read(()=>pr().getTextContent())}function Va(g,c){ro(g,()=>{const h=fi();if(h.isEmpty())return;if(c==="root"){pr().markDirty();return}const E=h._nodeMap;for(const[,S]of E)S.markDirty()},g._pendingEditorState===null?{tag:"history-merge"}:void 0)}function pr(){return zs(fi())}function zs(g){return g._nodeMap.get("root")}function gr(g){$r();const c=fi();if(g!==null){if(Object.isFrozen(g))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");g.dirty=!0,g.setCachedNodes(null)}c._selection=g}function od(){$r();const g=Dn();mn(g)}function Oi(g){const c=Dn(),h=Ac(g,c);if(h===null){const E=c.getRootElement();return g===E?Fn("root"):null}return Fn(h)}function Ka(g,c){return c?g.getTextContentSize():0}function Ac(g,c){let h=g;for(;h!=null;){const E=h[`__lexicalKey_${c._key}`];if(E!==void 0)return E;h=Us(h)}return null}function Rc(g){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(g)}function Hs(g){const c=[];let h=g;for(;h!==null;)c.push(h),h=h._parentEditor;return c}function $c(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ua(g){return g.nodeType===Xe?g.nodeValue:null}function Ai(g,c,h){const E=Wr(c._window);if(E===null)return;const S=E.anchorNode;let{anchorOffset:$,focusOffset:G}=E;if(S!==null){let V=Ua(S);const be=Qr(S);if(V!==null&&St(be)){if(V===Dt&&h){const ye=h.length;V=h,$=ye,G=ye}V!==null&&Gs(be,V,$,G,g)}}}function Gs(g,c,h,E,S){let $=g;if($.isAttached()&&(S||!$.isDirty())){const G=$.isComposing();let V=c;(G||S)&&c[c.length-1]===Dt&&(V=c.slice(0,-1));const be=$.getTextContent();if(S||V!==be){if(V===""){if(Pn(null),!ce&&!le&&!Pe){const Le=Dn();setTimeout(()=>{Le.update(()=>{$.isAttached()&&$.remove()})},20)}else $.remove();return}const ye=$.getParent(),Ne=cl(),we=$.getTextContentSize(),Ae=Xr(),Te=$.getKey();if($.isToken()||Ae!==null&&Te===Ae&&!G||Tt(Ne)&&(ye!==null&&!ye.canInsertTextBefore()&&Ne.anchor.offset===0||Ne.anchor.key===g.__key&&Ne.anchor.offset===0&&!$.canInsertTextBefore()||Ne.focus.key===g.__key&&Ne.focus.offset===we&&!$.canInsertTextAfter())){$.markDirty();return}const He=_n();if(!Tt(He)||h===null||E===null){$.setTextContent(V);return}if(He.setTextNodeRange($,h,$,E),$.isSegmented()){const Le=$.getTextContent(),Je=Kn(Le);$.replace(Je),$=Je}$.setTextContent(V)}}}function Dc(g){const c=g.getPreviousSibling();return(St(c)||rt(c)&&c.isInline())&&!c.canInsertTextAfter()}function kc(g,c){if(c.isSegmented())return!0;if(!g.isCollapsed())return!1;const h=g.anchor.offset,E=c.getParentOrThrow(),S=c.isToken();return h===0?!c.canInsertTextBefore()||!E.canInsertTextBefore()||S||Dc(c):h===c.getTextContentSize()?!c.canInsertTextAfter()||!E.canInsertTextAfter()||S:!1}function Ao(g,c,h,E){return g===9&&!c&&!h&&!E}function Mc(g,c,h,E){return g===66&&!c&&Ri(h,E)}function Ya(g,c,h,E){return g===73&&!c&&Ri(h,E)}function id(g,c,h,E){return g===85&&!c&&Ri(h,E)}function ad(g,c){return ua(g)&&!c}function la(g,c){return ua(g)&&c}function qa(g,c){return Ce&&c&&g===79}function Pc(g,c,h){return Xa(g)&&(Ce?c:h)}function Ic(g,c,h){return Qa(g)&&(Ce?c:h)}function Za(g,c){return Ce&&c&&Xa(g)}function Ja(g,c){return Ce&&c&&Qa(g)}function sd(g,c,h,E){return Ce?c||h?!1:Xa(g)||g===72&&E:E||c||h?!1:Xa(g)}function ld(g,c,h,E,S){return Ce?h||E||S?!1:Qa(g)||g===68&&c:c||E||S?!1:Qa(g)}function cd(g,c,h,E){return g===90&&!c&&Ri(h,E)}function ud(g,c,h,E){return Ce?g===90&&h&&c:g===89&&E||g===90&&E&&c}function ph(g,c,h,E){return c?!1:g===67?Ce?h:E:!1}function gh(g,c,h,E){return c?!1:g===88?Ce?h:E:!1}function Lc(g){return g===37}function dd(g){return g===39}function mh(g){return g===38}function yh(g){return g===40}function vh(g,c,h,E){return Lc(g)&&!c&&!E&&!h}function Fc(g,c,h,E,S){return Lc(g)&&!E&&!h&&(c||S)}function bh(g,c,h,E){return dd(g)&&!c&&!E&&!h}function _h(g,c,h,E,S){return dd(g)&&!E&&!h&&(c||S)}function fd(g,c,h){return mh(g)&&!c&&!h}function ca(g,c,h){return yh(g)&&!c&&!h}function hd(g,c,h,E){return g||c||h||E}function xh(g){return g===32}function Ri(g,c){return Ce?g:c}function ua(g){return g===13}function Xa(g){return g===8}function da(g){return g===27}function Qa(g){return g===46}function $i(g,c,h){return g===65&&Ri(c,h)}function Di(){const g=pr(),c=g.select(0,g.getChildrenSize());gr(sa(c))}function ki(g,c){g.__lexicalClassNameCache===void 0&&(g.__lexicalClassNameCache={});const h=g.__lexicalClassNameCache,E=h[c];if(E!==void 0)return E;const S=g[c];if(typeof S=="string"){const $=S.split(" ");return h[c]=$,$}return S}function es(g,c,h,E,S){if(h.size===0)return;const $=E.__type,G=E.__key,V=c.get($);if(V===void 0)throw Error(`Type ${$} not in registeredNodes`);const be=V.klass;let ye=g.get(be);ye===void 0&&(ye=new Map,g.set(be,ye));const Ne=ye.get(G),we=Ne==="destroyed"&&S==="created";(Ne===void 0||we)&&ye.set(G,we?"updated":S)}function jc(g){const c=fi(),h=c._readOnly,E=g.getType(),S=c._nodeMap,$=[];for(const[,G]of S)G instanceof g&&G.__type===E&&(h||G.isAttached())&&$.push(G);return $}function Vs(g,c,h){const E=g.getParent();let S=h,$=g;return E!==null&&(c&&h===0?(S=$.getIndexWithinParent(),$=E):!c&&h===$.getChildrenSize()&&(S=$.getIndexWithinParent()+1,$=E)),$.getChildAtIndex(c?S-1:S)}function fa(g,c){const h=g.offset;if(g.type==="element"){const E=g.getNode();return Vs(E,c,h)}else{const E=g.getNode();if(c&&h===0||!c&&h===E.getTextContentSize()){const S=c?E.getPreviousSibling():E.getNextSibling();return S===null?Vs(E.getParentOrThrow(),c,E.getIndexWithinParent()+(c?0:1)):S}}return null}function ni(g){const c=Ro(g).event,h=c&&c.inputType;return h==="insertFromPaste"||h==="insertFromPasteAsQuotation"}function mt(g,c,h){return Py(g,c,h)}function Ks(g){return!oo(g)&&!g.isLastChild()&&!g.isInline()}function ts(g,c){const h=g._keyToDOMMap.get(c);if(h===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${c}`);return h}function Us(g){const c=g.assignedSlot||g.parentElement;return c!==null&&c.nodeType===11?c.host:c}function Eh(g,c,h){const E=h.ownerDocument,S=E.defaultView;if(S===null)return;let{top:$,bottom:G}=c,V=0,be=0,ye=h;for(;ye!==null;){const Ne=ye===E.body;if(Ne)V=0,be=Ro(g).innerHeight;else{const Ae=ye.getBoundingClientRect();V=Ae.top,be=Ae.bottom}let we=0;if($<V?we=-(V-$):G>be&&(we=G-be),we!==0)if(Ne)S.scrollBy(0,we);else{const Ae=ye.scrollTop;ye.scrollTop+=we;const Te=ye.scrollTop-Ae;$-=Te,G-=Te}if(Ne)break;ye=Us(ye)}}function pd(g){return Dn()._updateTags.has(g)}function Ch(g){$r(),Dn()._updateTags.add(g)}function ri(g){const c=_n();if(!Tt(c)||!rt(g))return c;const{anchor:h,focus:E}=c,S=h.getNode(),$=E.getNode();return jn(S,g)&&h.set(g.__key,0,"element"),jn($,g)&&E.set(g.__key,0,"element"),c}function jn(g,c){let h=g.getParent();for(;h!==null;){if(h.is(c))return!0;h=h.getParent()}return!1}function Nt(g){const c=g.ownerDocument;return c&&c.defaultView||null}function Ro(g){const c=g._window;if(c===null)throw Error("window object not found");return c}function Ys(g){return rt(g)&&g.isInline()||zn(g)&&g.isInline()}function Bc(g){let c=g.getParentOrThrow();for(;c!==null;){if(tr(c))return c;c=c.getParentOrThrow()}return c}function tr(g){return oo(g)||rt(g)&&g.isShadowRoot()}function qs(g){const c=g.constructor.clone(g);return So(c,null),c}function ha(g){const c=Dn(),h=g.constructor.getType(),E=c._nodes.get(h);if(E===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const S=E.replace;if(S!==null){const $=S(g);if(!($ instanceof g.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return $}return g}function Zs(g,c){const h=g.getParent();if(oo(h)&&!rt(c)&&!zn(c))throw Error("Only element or decorator nodes can be inserted in to the root node")}function oi(g){const c=g.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let E=c.blockCursor;if(E!==void 0){if(typeof E=="string"){const S=E.split(" ");E=c.blockCursor=S}E!==void 0&&h.classList.add(...E)}return h}function ns(g){return(zn(g)||rt(g)&&!g.canBeEmpty())&&!g.isInline()}function pa(g,c,h){h.style.removeProperty("caret-color"),c._blockCursorElement=null;const E=g.parentElement;E!==null&&E.removeChild(g)}function Lt(g,c,h){let E=g._blockCursorElement;if(Tt(h)&&h.isCollapsed()&&h.anchor.type==="element"&&c.contains(document.activeElement)){const S=h.anchor,$=S.getNode(),G=S.offset,V=$.getChildrenSize();let be=!1,ye=null;if(G===V){const Ne=$.getChildAtIndex(G-1);ns(Ne)&&(be=!0)}else{const Ne=$.getChildAtIndex(G);if(ns(Ne)){const we=Ne.getPreviousSibling();(we===null||ns(we))&&(be=!0,ye=g.getElementByKey(Ne.__key))}}if(be){const Ne=g.getElementByKey($.__key);E===null&&(g._blockCursorElement=E=oi(g._config)),c.style.caretColor="transparent",ye===null?Ne.appendChild(E):Ne.insertBefore(E,ye);return}}E!==null&&pa(E,g,c)}function Wr(g){return he?(g||window).getSelection():null}function Wc(g,c){let h=g.getChildAtIndex(c);if(h==null&&(h=g),tr(g))throw Error("Can not call $splitNode() on root element");const E=G=>{const V=G.getParentOrThrow(),be=tr(V),ye=G===h&&!be?G:qs(G);if(be)return G.insertAfter(ye),[G,ye,ye];{const[Ne,we,Ae]=E(V),Te=G.getNextSiblings();return Ae.append(ye,...Te),[Ne,we,ye]}},[S,$]=E(h);return[S,$]}function Mi(g,c){let h=g;for(;h!==pr()&&h!=null;){if(c(h))return h;h=h.getParent()}return null}function gd(g){const c=[],h=[g];for(;h.length>0;){const E=h.pop();if(E===void 0)throw Error("Stack.length > 0; can't be undefined");rt(E)&&h.unshift(...E.getChildren()),E!==g&&c.push(E)}return c}function Pi(g){return ii(g)&&g.tagName==="A"}function ii(g){return g.nodeType===1}function ga(g){if(zn(g)&&!g.isInline())return!0;if(!rt(g)||tr(g))return!1;const c=g.getFirstChild(),h=c===null||ko(c)||St(c)||c.isInline();return!g.isInline()&&g.canBeEmpty()!==!1&&h}function rs(g,c){let h=g;for(;h!==null&&h.getParent()!==null&&!c(h);)h=h.getParentOrThrow();return c(h)?h:null}function md(g,c){const h=g._decorators;let E=g._pendingDecorators||h;const S=c._nodeMap;let $;for($ in E)S.has($)||(E===h&&(E=Oo(g)),delete E[$])}function zc(g,c,h,E,S,$){let G=g.getFirstChild();for(;G!==null;){const V=G.__key;G.__parent===c&&(rt(G)&&zc(G,V,h,E,S,$),h.has(V)||$.delete(V),S.push(V)),G=G.getNextSibling()}}function yd(g,c,h,E){const S=g._nodeMap,$=c._nodeMap,G=[];for(const[V]of E){const be=$.get(V);be!==void 0&&(be.isAttached()||(rt(be)&&zc(be,V,S,$,G,E),S.has(V)||E.delete(V),G.push(V)))}for(const V of G)$.delete(V);for(const V of h){const be=$.get(V);be!==void 0&&!be.isAttached()&&(S.has(V)||h.delete(V),$.delete(V))}}let Bn="",mr="",mo="",yo,wr,Ii,hn=!1,ai=!1,Li,os=null,Hc,ma,si,$o,Js,Fi;function Xs(g,c){const h=si.get(g);if(c!==null){const E=tl(g);E.parentNode===c&&c.removeChild(E)}if($o.has(g)||wr._keyToDOMMap.delete(g),rt(h)){const E=el(h,si);Wn(E,0,E.length-1,null)}h!==void 0&&es(Fi,Ii,Li,h,"destroyed")}function Wn(g,c,h,E){let S=c;for(;S<=h;++S){const $=g[S];$!==void 0&&Xs($,E)}}function vn(g,c){g.setProperty("text-align",c)}const Or="40px";function Qs(g,c){const h=yo.theme.indent;if(typeof h=="string"){const S=g.classList.contains(h);c>0&&!S?g.classList.add(h):c<1&&S&&g.classList.remove(h)}const E=getComputedStyle(g).getPropertyValue("--lexical-indent-base-value")||Or;g.style.setProperty("padding-inline-start",c===0?"":`calc(${c} * ${E})`)}function ya(g,c){const h=g.style;c===0?vn(h,""):c===wt?vn(h,"left"):c===_t?vn(h,"center"):c===Rt?vn(h,"right"):c===qe?vn(h,"justify"):c===ot?vn(h,"start"):c===yt&&vn(h,"end")}function is(g,c,h){const E=$o.get(g);if(E===void 0)throw Error("createNode: node does not exist in nodeMap");const S=E.createDOM(yo,wr);if(Lr(g,S,wr),St(E)?S.setAttribute("data-lexical-text","true"):zn(E)&&S.setAttribute("data-lexical-decorator","true"),rt(E)){const $=E.__indent,G=E.__size;if($!==0&&Qs(S,$),G!==0){const be=G-1,ye=el(E,$o);va(ye,be,E,S)}const V=E.__format;V!==0&&ya(S,V),E.isInline()||bn(null,E,S),Ks(E)&&(Bn+=Vt,mo+=Vt)}else{const $=E.getTextContent();if(zn(E)){const G=E.decorate(wr,yo);G!==null&&li(g,G),S.contentEditable="false"}else St(E)&&(E.isDirectionless()||(mr+=$));Bn+=$,mo+=$}if(c!==null)if(h!=null)c.insertBefore(S,h);else{const $=c.__lexicalLineBreak;$!=null?c.insertBefore(S,$):c.appendChild(S)}return Object.freeze(E),es(Fi,Ii,Li,E,"created"),S}function va(g,c,h,E){const S=mr;mr="",nr(g,h,0,c,E,null),Gc(h,E),mr=S}function nr(g,c,h,E,S,$){const G=Bn;Bn="";let V=h;for(;V<=E;++V)is(g[V],S,$);Ks(c)&&(Bn+=Vt),S.__lexicalTextContent=Bn,Bn=G+Bn}function eo(g,c){const h=c.get(g);return ko(h)||zn(h)&&h.isInline()}function bn(g,c,h){const E=g!==null&&(g.__size===0||eo(g.__last,si)),S=c.__size===0||eo(c.__last,$o);if(E){if(!S){const $=h.__lexicalLineBreak;$!=null&&h.removeChild($),h.__lexicalLineBreak=null}}else if(S){const $=document.createElement("br");h.__lexicalLineBreak=$,h.appendChild($)}}function Gc(g,c){const h=c.__lexicalDirTextContent,E=c.__lexicalDir;if(h!==mr||E!==os){const S=mr==="",$=S?os:Sc(mr);if($!==E){const G=c.classList,V=yo.theme;let be=E!==null?V[E]:void 0,ye=$!==null?V[$]:void 0;if(be!==void 0){if(typeof be=="string"){const Ne=be.split(" ");be=V[E]=Ne}G.remove(...be)}if($===null||S&&$==="ltr")c.removeAttribute("dir");else{if(ye!==void 0){if(typeof ye=="string"){const Ne=ye.split(" ");ye=V[$]=Ne}ye!==void 0&&G.add(...ye)}c.dir=$}if(!ai){const Ne=g.getWritable();Ne.__dir=$}}os=$,c.__lexicalDirTextContent=mr,c.__lexicalDir=$}}function wh(g,c,h){const E=mr;mr="",Vc(g,c,h),Gc(c,h),mr=E}function el(g,c){const h=[];let E=g.__first;for(;E!==null;){const S=c.get(E);if(S===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");h.push(E),E=S.__next}return h}function Vc(g,c,h){const E=Bn,S=g.__size,$=c.__size;if(Bn="",S===1&&$===1){const G=g.__first,V=c.__first;if(G===V)ba(G,h);else{const be=tl(G),ye=is(V,null,null);h.replaceChild(ye,be),Xs(G,null)}}else{const G=el(g,si),V=el(c,$o);if(S===0)$!==0&&nr(V,c,0,$-1,h,null);else if($===0){if(S!==0){const be=h.__lexicalLineBreak==null;Wn(G,0,S-1,be?null:h),be&&(h.textContent="")}}else vd(c,G,V,S,$,h)}Ks(c)&&(Bn+=Vt),h.__lexicalTextContent=Bn,Bn=E+Bn}function ba(g,c){const h=si.get(g);let E=$o.get(g);if(h===void 0||E===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const S=hn||ma.has(g)||Hc.has(g),$=ts(wr,g);if(h===E&&!S){if(rt(h)){const G=$.__lexicalTextContent;G!==void 0&&(Bn+=G,mo+=G);const V=$.__lexicalDirTextContent;V!==void 0&&(mr+=V)}else{const G=h.getTextContent();St(h)&&!h.isDirectionless()&&(mr+=G),mo+=G,Bn+=G}return $}if(h!==E&&S&&es(Fi,Ii,Li,E,"updated"),E.updateDOM(h,$,yo)){const G=is(g,null,null);if(c===null)throw Error("reconcileNode: parentDOM is null");return c.replaceChild(G,$),Xs(g,null),G}if(rt(h)&&rt(E)){const G=E.__indent;G!==h.__indent&&Qs($,G);const V=E.__format;V!==h.__format&&ya($,V),S&&(wh(h,E,$),!oo(E)&&!E.isInline()&&bn(h,E,$)),Ks(E)&&(Bn+=Vt,mo+=Vt)}else{const G=E.getTextContent();if(zn(E)){const V=E.decorate(wr,yo);V!==null&&li(g,V)}else St(E)&&!E.isDirectionless()&&(mr+=G);Bn+=G,mo+=G}return!ai&&oo(E)&&E.__cachedText!==mo&&(E=E.getWritable(),E.__cachedText=mo),Object.freeze(E),$}function li(g,c){let h=wr._pendingDecorators;const E=wr._decorators;if(h===null){if(E[g]===c)return;h=Oo(wr)}h[g]=c}function as(g){return g.firstChild}function pt(g){let c=g.nextSibling;return c!==null&&c===wr._blockCursorElement&&(c=c.nextSibling),c}function vd(g,c,h,E,S,$){const G=E-1,V=S-1;let be,ye,Ne=as($),we=0,Ae=0;for(;we<=G&&Ae<=V;){const Le=c[we],Je=h[Ae];if(Le===Je)Ne=pt(ba(Je,$)),we++,Ae++;else{be===void 0&&(be=new Set(c)),ye===void 0&&(ye=new Set(h));const ft=ye.has(Le),Ye=be.has(Je);if(!ft)Ne=pt(tl(Le)),Xs(Le,$),we++;else if(!Ye)is(Je,$,Ne),Ae++;else{const Ft=ts(wr,Je);Ft===Ne?Ne=pt(ba(Je,$)):(Ne!=null?$.insertBefore(Ft,Ne):$.appendChild(Ft),ba(Je,$)),we++,Ae++}}}const Te=we>G,He=Ae>V;if(Te&&!He){const Le=h[V+1],Je=Le===void 0?null:wr.getElementByKey(Le);nr(h,g,Ae,V,$,Je)}else He&&!Te&&Wn(c,we,G,$)}function bd(g,c,h,E,S,$){Bn="",mo="",mr="",hn=E===Ct,os=null,wr=h,yo=h._config,Ii=h._nodes,Li=wr._listeners.mutation,Hc=S,ma=$,si=g._nodeMap,$o=c._nodeMap,ai=c._readOnly,Js=new Map(h._keyToDOMMap);const G=new Map;return Fi=G,ba("root",null),wr=void 0,Ii=void 0,Hc=void 0,ma=void 0,si=void 0,$o=void 0,yo=void 0,Js=void 0,Fi=void 0,G}function Lr(g,c,h){const E=h._keyToDOMMap;c["__lexicalKey_"+h._key]=g,E.set(g,c)}function tl(g){const c=Js.get(g);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${g}`);return c}const on=Object.freeze({}),Do=30,nt=[["keydown",A],["pointerdown",zr],["compositionstart",s],["compositionend",x],["input",f],["click",Uc],["cut",on],["copy",on],["dragstart",on],["dragover",on],["dragend",on],["paste",on],["focus",on],["blur",on],["drop",on]];Be&&nt.push(["beforeinput",(g,c)=>ls(g,c)]);let _a=0,ji=0,Ar=0,xa=null,Bi=0,nl=!1,Ea=!1,vo=!1,ss=!1,bo=[0,"",0,"root",0];function Kc(g,c,h,E,S){const $=g.anchor,G=g.focus,V=$.getNode(),be=Dn(),ye=Wr(be._window),Ne=ye!==null?ye.anchorNode:null,we=$.key,Ae=be.getElementByKey(we),Te=h.length;return we!==G.key||!St(V)||(!S&&(!Be||Ar<E+50)||V.isDirty()&&Te<2||Rc(h))&&$.offset!==G.offset&&!V.isComposing()||js(V)||V.isDirty()&&Te>1||(S||!Be)&&Ae!==null&&!V.isComposing()&&Ne!==Rn(Ae)||ye!==null&&c!==null&&(!c.collapsed||c.startContainer!==ye.anchorNode||c.startOffset!==ye.anchorOffset)||V.getFormat()!==g.format||V.getStyle()!==g.style||kc(g,V)}function _d(g,c){return g!==null&&g.nodeValue!==null&&g.nodeType===Xe&&c!==0&&c!==g.nodeValue.length}function xd(g,c,h){const{anchorNode:E,anchorOffset:S,focusNode:$,focusOffset:G}=g;nl&&(nl=!1,_d(E,S)&&_d($,G))||ro(c,()=>{if(!h){gr(null);return}if(!ti(c,E,$))return;const V=_n();if(Tt(V)){const be=V.anchor,ye=be.getNode();if(V.isCollapsed()){g.type==="Range"&&g.anchorNode===g.focusNode&&(V.dirty=!0);const Ne=Ro(c).event,we=Ne?Ne.timeStamp:performance.now(),[Ae,Te,He,Le,Je]=bo,ft=pr(),Ye=c.isComposing()===!1&&ft.getTextContent()==="";we<Je+200&&be.offset===He&&be.key===Le?(V.format=Ae,V.style=Te):be.type==="text"?(V.format=ye.getFormat(),V.style=ye.getStyle()):be.type==="element"&&!Ye&&(V.format=0,V.style="")}else{let Ne=Qe,we=!1;const Ae=V.getNodes(),Te=Ae.length;for(let He=0;He<Te;He++){const Le=Ae[He];if(St(Le)&&(we=!0,Ne&=Le.getFormat(),Ne===0))break}V.format=we?Ne:0}}mt(c,t,void 0)})}function Uc(g,c){ro(c,()=>{const h=_n(),E=Wr(c._window),S=cl();if(E){if(Tt(h)){const $=h.anchor,G=$.getNode();if($.type==="element"&&$.offset===0&&h.isCollapsed()&&!oo(G)&&pr().getChildrenSize()===1&&G.getTopLevelElementOrThrow().isEmpty()&&S!==null&&h.is(S))E.removeAllRanges(),h.dirty=!0;else if(g.detail===3&&!h.isCollapsed()){const V=h.focus.getNode();G!==V&&(rt(G)?G.select(0):G.getParentOrThrow().select(0))}}else if(g.pointerType==="touch"){const $=E.anchorNode;if($!==null){const G=$.nodeType;if(G===We||G===Xe){const V=Sh(S,E,c);gr(V)}}}}mt(c,n,g)})}function zr(g,c){const h=g.target,E=g.pointerType;h instanceof Node&&E!=="touch"&&ro(c,()=>{Fs(h)||(Ea=!0)})}function Yc(g){if(!g.getTargetRanges)return null;const c=g.getTargetRanges();return c.length===0?null:c[0]}function qc(g,c){return g!==c||rt(g)||rt(c)||!g.isToken()||!c.isToken()}function Ed(g){return ji===229&&g<_a+Do}function ls(g,c){const h=g.inputType,E=Yc(g);h==="deleteCompositionText"||Oe&&ni(c)||h!=="insertCompositionText"&&ro(c,()=>{const S=_n();if(h==="deleteContentBackward"){if(S===null){const Ne=cl();if(!Tt(Ne))return;gr(Ne.clone())}if(Tt(S)){if(ve&&Pn(S.anchor.key),Ed(g.timeStamp)&&c.isComposing()&&S.anchor.key===S.focus.key){if(Pn(null),_a=0,setTimeout(()=>{ro(c,()=>{Pn(null)})},Do),Tt(S)){const Ne=S.anchor.getNode();Ne.markDirty(),S.format=Ne.getFormat(),S.style=Ne.getStyle()}S.anchor.getNode().getTextContent().length<=1&&(g.preventDefault(),mt(c,r,!0))}else g.preventDefault(),mt(c,r,!0);return}}if(!Tt(S))return;const $=g.data;xa!==null&&Ai(!1,c,xa),(!S.dirty||xa!==null)&&S.isCollapsed()&&!oo(S.anchor.getNode())&&E!==null&&S.applyDOMRange(E),xa=null;const G=S.anchor,V=S.focus,be=G.getNode(),ye=V.getNode();if(h==="insertText"||h==="insertTranspose"){if($===`
234
- `)g.preventDefault(),mt(c,o,!1);else if($===Vt)g.preventDefault(),mt(c,i,void 0);else if($==null&&g.dataTransfer){const Ne=g.dataTransfer.getData("text/plain");g.preventDefault(),S.insertRawText(Ne)}else $!=null&&Kc(S,E,$,g.timeStamp,!0)?(g.preventDefault(),mt(c,a,$)):xa=$;Ar=g.timeStamp;return}switch(g.preventDefault(),h){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{mt(c,a,g);break}case"insertFromComposition":{Pn(null),mt(c,a,g);break}case"insertLineBreak":{Pn(null),mt(c,o,!1);break}case"insertParagraph":{Pn(null),vo&&!le?(vo=!1,mt(c,o,!1)):mt(c,i,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{mt(c,l,g);break}case"deleteByComposition":{qc(be,ye)&&mt(c,u,g);break}case"deleteByDrag":case"deleteByCut":{mt(c,u,g);break}case"deleteContent":{mt(c,r,!1);break}case"deleteWordBackward":{mt(c,p,!0);break}case"deleteWordForward":{mt(c,p,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{mt(c,m,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{mt(c,m,!1);break}case"formatStrikeThrough":{mt(c,b,"strikethrough");break}case"formatBold":{mt(c,b,"bold");break}case"formatItalic":{mt(c,b,"italic");break}case"formatUnderline":{mt(c,b,"underline");break}case"historyUndo":{mt(c,C,void 0);break}case"historyRedo":{mt(c,_,void 0);break}}})}function f(g,c){g.stopPropagation(),ro(c,()=>{const h=_n(),E=g.data,S=Yc(g);if(E!=null&&Tt(h)&&Kc(h,S,E,g.timeStamp,!1)){ss&&(d(c,E),ss=!1);const $=h.anchor,G=$.getNode(),V=Wr(c._window);if(V===null)return;const be=$.offset;(!Be||h.isCollapsed()||!St(G)||V.anchorNode===null||G.getTextContent().slice(0,be)+E+G.getTextContent().slice(be+h.focus.offset)!==Ua(V.anchorNode))&&mt(c,a,E);const ye=E.length;Oe&&ye>1&&g.inputType==="insertCompositionText"&&!c.isComposing()&&(h.anchor.offset-=ye),!ce&&!le&&!Pe&&c.isComposing()&&(_a=0,Pn(null))}else Ai(!1,c,E!==null?E:void 0),ss&&(d(c,E||void 0),ss=!1);od()}),xa=null}function s(g,c){ro(c,()=>{const h=_n();if(Tt(h)&&!c.isComposing()){const E=h.anchor,S=h.anchor.getNode();Pn(E.key),(g.timeStamp<_a+Do||E.type==="element"||!h.isCollapsed()||S.getFormat()!==h.format||S.getStyle()!==h.style)&&mt(c,a,sn)}})}function d(g,c){const h=g._compositionKey;if(Pn(null),h!==null&&c!=null){if(c===""){const E=Fn(h),S=Rn(g.getElementByKey(h));S!==null&&S.nodeValue!==null&&St(E)&&Gs(E,S.nodeValue,null,null,!0);return}if(c[c.length-1]===`
235
- `){const E=_n();if(Tt(E)){const S=E.focus;E.anchor.set(S.key,S.offset,S.type),mt(g,M,null);return}}}Ai(!0,g,c)}function x(g,c){Oe?ss=!0:ro(c,()=>{d(c,g.data)})}function A(g,c){if(_a=g.timeStamp,ji=g.keyCode,c.isComposing())return;const{keyCode:h,shiftKey:E,ctrlKey:S,metaKey:$,altKey:G}=g;if(!mt(c,y,g)){if(bh(h,S,G,$))mt(c,v,g);else if(_h(h,S,E,G,$))mt(c,T,g);else if(vh(h,S,G,$))mt(c,O,g);else if(Fc(h,S,E,G,$))mt(c,R,g);else if(fd(h,S,$))mt(c,k,g);else if(ca(h,S,$))mt(c,P,g);else if(la(h,E))vo=!0,mt(c,M,g);else if(xh(h))mt(c,Y,g);else if(qa(h,S))g.preventDefault(),vo=!0,mt(c,o,!0);else if(ad(h,E))vo=!1,mt(c,M,g);else if(sd(h,G,$,S))Xa(h)?mt(c,X,g):(g.preventDefault(),mt(c,r,!0));else if(da(h))mt(c,oe,g);else if(ld(h,S,E,G,$))Qa(h)?mt(c,Z,g):(g.preventDefault(),mt(c,r,!1));else if(Pc(h,G,S))g.preventDefault(),mt(c,p,!0);else if(Ic(h,G,S))g.preventDefault(),mt(c,p,!1);else if(Za(h,$))g.preventDefault(),mt(c,m,!0);else if(Ja(h,$))g.preventDefault(),mt(c,m,!1);else if(Mc(h,G,$,S))g.preventDefault(),mt(c,b,"bold");else if(id(h,G,$,S))g.preventDefault(),mt(c,b,"underline");else if(Ya(h,G,$,S))g.preventDefault(),mt(c,b,"italic");else if(Ao(h,G,S,$))mt(c,K,g);else if(cd(h,E,$,S))g.preventDefault(),mt(c,C,void 0);else if(ud(h,E,$,S))g.preventDefault(),mt(c,_,void 0);else{const V=c._editorState._selection;yr(V)?ph(h,E,$,S)?(g.preventDefault(),mt(c,re,g)):gh(h,E,$,S)?(g.preventDefault(),mt(c,B,g)):$i(h,$,S)&&(g.preventDefault(),mt(c,W,g)):!Oe&&$i(h,$,S)&&(g.preventDefault(),mt(c,W,g))}hd(S,E,G,$)&&mt(c,ue,g)}}function D(g){let c=g.__lexicalEventHandles;return c===void 0&&(c=[],g.__lexicalEventHandles=c),c}const z=new Map;function ie(g){const c=g.target,h=c==null?null:c.nodeType===9?c.defaultView:c.ownerDocument.defaultView,E=Wr(h);if(E===null)return;const S=Si(E.anchorNode);if(S===null)return;Ea&&(Ea=!1,ro(S,()=>{const Ne=cl(),we=E.anchorNode;if(we===null)return;const Ae=we.nodeType;if(Ae!==We&&Ae!==Xe)return;const Te=Sh(Ne,E,S);gr(Te)}));const $=Hs(S),G=$[$.length-1],V=G._key,be=z.get(V),ye=be||G;ye!==S&&xd(E,ye,!1),xd(E,S,!0),S!==G?z.set(V,S):be&&z.delete(V)}function xe(g){g._lexicalHandled=!0}function Re(g){return g._lexicalHandled===!0}function Ue(g,c){Bi===0&&g.ownerDocument.addEventListener("selectionchange",ie),Bi++,g.__lexicalEditor=c;const h=D(g);for(let E=0;E<nt.length;E++){const[S,$]=nt[E],G=typeof $=="function"?V=>{Re(V)||(xe(V),c.isEditable()&&$(V,c))}:V=>{if(!Re(V)&&(xe(V),c.isEditable()))switch(S){case"cut":return mt(c,B,V);case"copy":return mt(c,re,V);case"paste":return mt(c,l,V);case"dragstart":return mt(c,U,V);case"dragover":return mt(c,j,V);case"dragend":return mt(c,ee,V);case"focus":return mt(c,I,V);case"blur":return mt(c,q,V);case"drop":return mt(c,ne,V)}};g.addEventListener(S,G),h.push(()=>{g.removeEventListener(S,G)})}}function Ze(g){Bi!==0&&(Bi--,Bi===0&&g.ownerDocument.removeEventListener("selectionchange",ie));const c=g.__lexicalEditor;c!=null&&(Ge(c),g.__lexicalEditor=null);const h=D(g);for(let E=0;E<h.length;E++)h[E]();g.__lexicalEventHandles=[]}function Ge(g){if(g._parentEditor!==null){const c=Hs(g),h=c[c.length-1]._key;z.get(h)===g&&z.delete(h)}else z.delete(g._key)}function Ie(){nl=!0}function it(g,c,h,E,S){bo=[g,c,h,E,S]}function vt(g,c,h){$r();const E=g.__key,S=g.getParent();if(S===null)return;const $=ri(g);let G=!1;if(Tt($)&&c){const V=$.anchor,be=$.focus;V.key===E&&(Od(V,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0),be.key===E&&(Od(be,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0)}else yr($)&&c&&g.isSelected()&&g.selectPrevious();if(Tt($)&&c&&!G){const V=g.getIndexWithinParent();Jr(g),Sd($,S,V,-1)}else Jr(g);!h&&!tr(S)&&!S.canBeEmpty()&&S.isEmpty()&&vt(S,c),c&&oo(S)&&S.isEmpty()&&S.selectEnd()}class $t{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(c){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(c){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,So(this,c),this.__type!=="root"&&($r(),Ut(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let c=this.__key;for(;c!==null;){if(c==="root")return!0;const h=Fn(c);if(h===null)break;c=h.__parent}return!1}isSelected(c){const h=c||_n();if(h==null)return!1;const E=h.getNodes().some(S=>S.__key===this.__key);return St(this)?E:Tt(h)&&h.anchor.type==="element"&&h.focus.type==="element"&&h.anchor.key===h.focus.key&&h.anchor.offset===h.focus.offset?!1:E}getKey(){return this.__key}getIndexWithinParent(){const c=this.getParent();if(c===null)return-1;let h=c.getFirstChild(),E=0;for(;h!==null;){if(this.is(h))return E;E++,h=h.getNextSibling()}return-1}getParent(){const c=this.getLatest().__parent;return c===null?null:Fn(c)}getParentOrThrow(){const c=this.getParent();if(c===null)throw Error(`Expected node ${this.__key} to have a parent.`);return c}getTopLevelElement(){let c=this;for(;c!==null;){const h=c.getParent();if(tr(h))return c;c=h}return null}getTopLevelElementOrThrow(){const c=this.getTopLevelElement();if(c===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return c}getParents(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h),h=h.getParent();return c}getParentKeys(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h.__key),h=h.getParent();return c}getPreviousSibling(){const c=this.getLatest().__prev;return c===null?null:Fn(c)}getPreviousSiblings(){const c=[],h=this.getParent();if(h===null)return c;let E=h.getFirstChild();for(;E!==null&&!E.is(this);)c.push(E),E=E.getNextSibling();return c}getNextSibling(){const c=this.getLatest().__next;return c===null?null:Fn(c)}getNextSiblings(){const c=[];let h=this.getNextSibling();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getCommonAncestor(c){const h=this.getParents(),E=c.getParents();rt(this)&&h.unshift(this),rt(c)&&E.unshift(c);const S=h.length,$=E.length;if(S===0||$===0||h[S-1]!==E[$-1])return null;const G=new Set(E);for(let V=0;V<S;V++){const be=h[V];if(G.has(be))return be}return null}is(c){return c==null?!1:this.__key===c.__key}isBefore(c){if(this===c)return!1;if(c.isParentOf(this))return!0;if(this.isParentOf(c))return!1;const h=this.getCommonAncestor(c);let E=0,S=0,$=this;for(;;){const G=$.getParentOrThrow();if(G===h){E=$.getIndexWithinParent();break}$=G}for($=c;;){const G=$.getParentOrThrow();if(G===h){S=$.getIndexWithinParent();break}$=G}return E<S}isParentOf(c){const h=this.__key;if(h===c.__key)return!1;let E=c;for(;E!==null;){if(E.__key===h)return!0;E=E.getParent()}return!1}getNodesBetween(c){const h=this.isBefore(c),E=[],S=new Set;let $=this;for(;;){const G=$.__key;if(S.has(G)||(S.add(G),E.push($)),$===c)break;const V=rt($)?h?$.getFirstChild():$.getLastChild():null;if(V!==null){$=V;continue}const be=h?$.getNextSibling():$.getPreviousSibling();if(be!==null){$=be;continue}const ye=$.getParentOrThrow();if(S.has(ye.__key)||E.push(ye),ye===c)break;let Ne=null,we=ye;do{if(we===null)throw Error("getNodesBetween: ancestor is null");Ne=h?we.getNextSibling():we.getPreviousSibling(),we=we.getParent(),we!==null&&Ne===null&&!S.has(we.__key)&&E.push(we)}while(Ne===null);$=Ne}return h||E.reverse(),E}isDirty(){const c=Dn()._dirtyLeaves;return c!==null&&c.has(this.__key)}getLatest(){const c=Fn(this.__key);if(c===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return c}getWritable(){$r();const c=fi(),h=Dn(),E=c._nodeMap,S=this.__key,$=this.getLatest(),G=$.__parent,V=h._cloneNotNeeded,be=_n();if(or(be)&&be.setCachedNodes(null),V.has(S))return Ga($),$;const ye=$.constructor.clone($);return ye.__parent=G,ye.__next=$.__next,ye.__prev=$.__prev,rt($)&&rt(ye)?(ye.__first=$.__first,ye.__last=$.__last,ye.__size=$.__size,ye.__indent=$.__indent,ye.__format=$.__format,ye.__dir=$.__dir):St($)&&St(ye)&&(ye.__format=$.__format,ye.__style=$.__style,ye.__mode=$.__mode,ye.__detail=$.__detail),V.add(S),ye.__key=S,Ga(ye),E.set(S,ye),ye}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(c,h){throw Error("createDOM: base method not extended")}updateDOM(c,h,E){throw Error("updateDOM: base method not extended")}exportDOM(c){return{element:this.createDOM(c._config,c)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(c){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(c){vt(this,!0,c)}replace(c,h){$r();let E=_n();E!==null&&(E=E.clone()),Zs(this,c);const S=this.getLatest(),$=this.__key,G=c.__key,V=c.getWritable(),be=this.getParentOrThrow().getWritable(),ye=be.__size;Jr(V);const Ne=S.getPreviousSibling(),we=S.getNextSibling(),Ae=S.__prev,Te=S.__next,He=S.__parent;if(vt(S,!1,!0),Ne===null)be.__first=G;else{const Le=Ne.getWritable();Le.__next=G}if(V.__prev=Ae,we===null)be.__last=G;else{const Le=we.getWritable();Le.__prev=G}if(V.__next=Te,V.__parent=He,be.__size=ye,h&&this.getChildren().forEach(Le=>{V.append(Le)}),Tt(E)){gr(E);const Le=E.anchor,Je=E.focus;Le.key===$&&al(Le,V),Je.key===$&&al(Je,V)}return Xr()===$&&Pn(G),V}insertAfter(c,h=!0){$r(),Zs(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.getParent(),G=_n();let V=!1,be=!1;if($!==null){const Te=c.getIndexWithinParent();if(Jr(S),Tt(G)){const He=$.__key,Le=G.anchor,Je=G.focus;V=Le.type==="element"&&Le.key===He&&Le.offset===Te+1,be=Je.type==="element"&&Je.key===He&&Je.offset===Te+1}}const ye=this.getNextSibling(),Ne=this.getParentOrThrow().getWritable(),we=S.__key,Ae=E.__next;if(ye===null)Ne.__last=we;else{const Te=ye.getWritable();Te.__prev=we}if(Ne.__size++,E.__next=we,S.__next=Ae,S.__prev=E.__key,S.__parent=E.__parent,h&&Tt(G)){const Te=this.getIndexWithinParent();Sd(G,Ne,Te+1);const He=Ne.__key;V&&G.anchor.set(He,Te+2,"element"),be&&G.focus.set(He,Te+2,"element")}return c}insertBefore(c,h=!0){$r(),Zs(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.__key;Jr(S);const G=this.getPreviousSibling(),V=this.getParentOrThrow().getWritable(),be=E.__prev,ye=this.getIndexWithinParent();if(G===null)V.__first=$;else{const we=G.getWritable();we.__next=$}V.__size++,E.__prev=$,S.__prev=be,S.__next=E.__key,S.__parent=E.__parent;const Ne=_n();if(h&&Tt(Ne)){const we=this.getParentOrThrow();Sd(Ne,we,ye)}return c}isParentRequired(){return!1}createParentElementNode(){return zi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(c,h){$r();const E=this.getPreviousSibling(),S=this.getParentOrThrow();if(E===null)return S.select(0,0);if(rt(E))return E.select();if(!St(E)){const $=E.getIndexWithinParent()+1;return S.select($,$)}return E.select(c,h)}selectNext(c,h){$r();const E=this.getNextSibling(),S=this.getParentOrThrow();if(E===null)return S.select();if(rt(E))return E.select(0,0);if(!St(E)){const $=E.getIndexWithinParent();return S.select($,$)}return E.select(c,h)}markDirty(){this.getWritable()}}function Ut(g,c){const h=Dn()._nodes.get(g);if(h===void 0)throw Error(`Create node: Attempted to create node ${c.name} that was not configured to be used on the editor.`);const E=h.klass;if(E!==c)throw Error(`Create node: Type ${g} in node ${c.name} does not match registered node ${E.name} with the same type`)}function $n(g,c,h){const E=c.getParentOrThrow().getLastChild();let S=c;const $=[c];for(;S!==E;){if(!S.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");S=S.getNextSibling(),$.push(S)}let G=g;for(const V of $)G=G.insertAfter(V)}class Xn extends $t{static getType(){return"linebreak"}static clone(c){return new Xn(c.__key)}constructor(c){super(c)}getTextContent(){return`
236
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:c=>{const h=c.parentElement;let E,S;return h!==null&&((E=h.firstChild)===c||E.nextSibling===c&&E.nodeType===Xe&&(E.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((S=h.lastChild)===c||S.previousSibling===c&&S.nodeType===Xe&&(S.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:cs,priority:0}}}}static importJSON(c){return Rr()}exportJSON(){return{type:"linebreak",version:1}}}function cs(g){return{node:Rr()}}function Rr(){return ha(new Xn)}function ko(g){return g instanceof Xn}function rl(g,c){return c&tt?"code":c&Bt?"mark":c&ut?"sub":c&Et?"sup":null}function Ca(g,c){return c&De?"strong":c&Fe?"em":"span"}function Cd(g,c,h,E,S){const $=E.classList;let G=ki(S,"base");G!==void 0&&$.add(...G),G=ki(S,"underlineStrikethrough");let V=!1;const be=c&ze&&c&ke,ye=h&ze&&h&ke;G!==void 0&&(ye?(V=!0,be||$.add(...G)):be&&$.remove(...G));for(const Ne in Sr){const we=Sr[Ne];if(G=ki(S,Ne),G!==void 0)if(h&we){if(V&&(Ne==="underline"||Ne==="strikethrough")){c&we&&$.remove(...G);continue}(!(c&we)||be&&Ne==="underline"||Ne==="strikethrough")&&$.add(...G)}else c&we&&$.remove(...G)}}function Zc(g,c){const h=g.length,E=c.length;let S=0,$=0;for(;S<h&&S<E&&g[S]===c[S];)S++;for(;$+S<h&&$+S<E&&g[h-$-1]===c[E-$-1];)$++;return[S,h-S-$,c.slice(S,E-$)]}function to(g,c,h){const E=c.firstChild,S=h.isComposing(),$=g+(S?Dt:"");if(E==null)c.textContent=$;else{const G=E.nodeValue;if(G!==$)if(S||Oe){const[V,be,ye]=Zc(G,$);be!==0&&E.deleteData(V,be),E.insertData(V,ye)}else E.nodeValue=$}}function wa(g,c,h,E,S,$){to(S,g,c);const G=$.theme.text;G!==void 0&&Cd(h,0,E,g,G)}function Ta(g,c){const h=document.createElement(c);return h.appendChild(g),h}class ci extends $t{static getType(){return"text"}static clone(c){return new ci(c.__text,c.__key)}constructor(c,h){super(h),this.__text=c,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const c=this.getLatest();return Ee[c.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===me}isComposing(){return this.__key===Xr()}isSegmented(){return this.getLatest().__mode===_e}isDirectionless(){return(this.getLatest().__detail&et)!==0}isUnmergeable(){return(this.getLatest().__detail&lt)!==0}hasFormat(c){const h=Sr[c];return(this.getFormat()&h)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(c,h){const E=this.getLatest().__format;return er(E,c,h)}createDOM(c){const h=this.__format,E=rl(this,h),S=Ca(this,h),$=E===null?S:E,G=document.createElement($);let V=G;this.hasFormat("code")&&G.setAttribute("spellcheck","false"),E!==null&&(V=document.createElement(S),G.appendChild(V));const be=this.__text;wa(V,this,S,h,be,c);const ye=this.__style;return ye!==""&&(G.style.cssText=ye),G}updateDOM(c,h,E){const S=this.__text,$=c.__format,G=this.__format,V=rl(this,$),be=rl(this,G),ye=Ca(this,$),Ne=Ca(this,G);if((V===null?ye:V)!==(be===null?Ne:be))return!0;if(V===be&&ye!==Ne){const Le=h.firstChild;if(Le==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const Je=document.createElement(Ne);return wa(Je,this,Ne,G,S,E),h.replaceChild(Je,Le),!1}let we=h;if(be!==null&&V!==null&&(we=h.firstChild,we==null))throw Error("updateDOM: innerDOM is null or undefined");to(S,we,this);const Ae=E.theme.text;Ae!==void 0&&$!==G&&Cd(Ne,$,G,we,Ae);const Te=c.__style,He=this.__style;return Te!==He&&(h.style.cssText=He),!1}static importDOM(){return{"#text":()=>({conversion:Xc,priority:0}),b:()=>({conversion:wd,priority:0}),code:()=>({conversion:no,priority:0}),em:()=>({conversion:no,priority:0}),i:()=>({conversion:no,priority:0}),s:()=>({conversion:no,priority:0}),span:()=>({conversion:Th,priority:0}),strong:()=>({conversion:no,priority:0}),sub:()=>({conversion:no,priority:0}),sup:()=>({conversion:no,priority:0}),u:()=>({conversion:no,priority:0})}}static importJSON(c){const h=Kn(c.text);return h.setFormat(c.format),h.setDetail(c.detail),h.setMode(c.mode),h.setStyle(c.style),h}exportDOM(c){let{element:h}=super.exportDOM(c);if(!(h!==null&&ii(h)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return h.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(h=Ta(h,"b")),this.hasFormat("italic")&&(h=Ta(h,"i")),this.hasFormat("strikethrough")&&(h=Ta(h,"s")),this.hasFormat("underline")&&(h=Ta(h,"u")),{element:h}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(c,h){}setFormat(c){const h=this.getWritable();return h.__format=typeof c=="string"?Sr[c]:c,h}setDetail(c){const h=this.getWritable();return h.__detail=typeof c=="string"?Zn[c]:c,h}setStyle(c){const h=this.getWritable();return h.__style=c,h}toggleFormat(c){const h=this.getFormat(),E=er(h,c,null);return this.setFormat(E)}toggleDirectionless(){const c=this.getWritable();return c.__detail^=et,c}toggleUnmergeable(){const c=this.getWritable();return c.__detail^=lt,c}setMode(c){const h=aa[c];if(this.__mode===h)return this;const E=this.getWritable();return E.__mode=h,E}setTextContent(c){if(this.__text===c)return this;const h=this.getWritable();return h.__text=c,h}select(c,h){$r();let E=c,S=h;const $=_n(),G=this.getTextContent(),V=this.__key;if(typeof G=="string"){const be=G.length;E===void 0&&(E=be),S===void 0&&(S=be)}else E=0,S=0;if(Tt($)){const be=Xr();(be===$.anchor.key||be===$.focus.key)&&Pn(V),$.setTextNodeRange(this,E,this,S)}else return wy(V,E,V,S,"text","text");return $}selectStart(){return this.select(0,0)}selectEnd(){const c=this.getTextContentSize();return this.select(c,c)}spliceText(c,h,E,S){const $=this.getWritable(),G=$.__text,V=E.length;let be=c;be<0&&(be=V+be,be<0&&(be=0));const ye=_n();if(S&&Tt(ye)){const we=c+V;ye.setTextNodeRange($,we,$,we)}const Ne=G.slice(0,be)+E+G.slice(be+h);return $.__text=Ne,$}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...c){$r();const h=this.getLatest(),E=h.getTextContent(),S=h.__key,$=Xr(),G=new Set(c),V=[],be=E.length;let ye="";for(let jt=0;jt<be;jt++)ye!==""&&G.has(jt)&&(V.push(ye),ye=""),ye+=E[jt];ye!==""&&V.push(ye);const Ne=V.length;if(Ne===0)return[];if(V[0]===E)return[h];const we=V[0],Ae=h.getParentOrThrow();let Te;const He=h.getFormat(),Le=h.getStyle(),Je=h.__detail;let ft=!1;h.isSegmented()?(Te=Kn(we),Te.__format=He,Te.__style=Le,Te.__detail=Je,ft=!0):(Te=h.getWritable(),Te.__text=we);const Ye=_n(),Ft=[Te];let Ht=we.length;for(let jt=1;jt<Ne;jt++){const Jt=V[jt],cn=Jt.length,Wt=Kn(Jt).getWritable();Wt.__format=He,Wt.__style=Le,Wt.__detail=Je;const Hn=Wt.__key,Lo=Ht+cn;if(Tt(Ye)){const Hi=Ye.anchor,hl=Ye.focus;Hi.key===S&&Hi.type==="text"&&Hi.offset>Ht&&Hi.offset<=Lo&&(Hi.key=Hn,Hi.offset-=Ht,Ye.dirty=!0),hl.key===S&&hl.type==="text"&&hl.offset>Ht&&hl.offset<=Lo&&(hl.key=Hn,hl.offset-=Ht,Ye.dirty=!0)}$===S&&Pn(Hn),Ht=Lo,Ft.push(Wt)}Oc(this);const Pt=Ae.getWritable(),Zt=this.getIndexWithinParent();return ft?(Pt.splice(Zt,0,Ft),this.remove()):Pt.splice(Zt,1,Ft),Tt(Ye)&&Sd(Ye,Ae,Zt,Ne-1),Ft}mergeWithSibling(c){const h=c===this.getPreviousSibling();if(!h&&c!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const E=this.__key,S=c.__key,$=this.__text,G=$.length;Xr()===S&&Pn(E);const V=_n();if(Tt(V)){const we=V.anchor,Ae=V.focus;we!==null&&we.key===S&&(Ny(we,h,E,c,G),V.dirty=!0),Ae!==null&&Ae.key===S&&(Ny(Ae,h,E,c,G),V.dirty=!0)}const be=c.__text,ye=h?be+$:$+be;this.setTextContent(ye);const Ne=this.getWritable();return c.remove(),Ne}isTextEntity(){return!1}}function Th(g){const c=g,h=c.style.fontWeight==="700",E=c.style.textDecoration==="line-through",S=c.style.fontStyle==="italic",$=c.style.textDecoration==="underline",G=c.style.verticalAlign;return{forChild:V=>(St(V)&&(h&&V.toggleFormat("bold"),E&&V.toggleFormat("strikethrough"),S&&V.toggleFormat("italic"),$&&V.toggleFormat("underline"),G==="sub"&&V.toggleFormat("subscript"),G==="super"&&V.toggleFormat("superscript")),V),node:null}}function wd(g){const c=g.style.fontWeight==="normal";return{forChild:h=>(St(h)&&!c&&h.toggleFormat("bold"),h),node:null}}const Jc=new WeakMap;function ol(g){return g.nodeName==="PRE"||g.nodeType===We&&g.style!==void 0&&g.style.whiteSpace!==void 0&&g.style.whiteSpace.startsWith("pre")}function Td(g){let c,h=g.parentNode;const E=[g];for(;h!==null&&(c=Jc.get(h))===void 0&&!ol(h);)E.push(h),h=h.parentNode;const S=c===void 0?h:c;for(let $=0;$<E.length;$++)Jc.set(E[$],S);return S}function Xc(g){const c=g;if(g.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=c.textContent||"";if(Td(c)!==null){const E=h.split(/(\r?\n|\t)/),S=[],$=E.length;for(let G=0;G<$;G++){const V=E[G];V===`
237
- `||V===`\r
238
- `?S.push(Rr()):V===" "?S.push(Na()):V!==""&&S.push(Kn(V))}return{node:S}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let E=c,S=!0;for(;E!==null&&(E=eu(E,!1))!==null;){const $=E.textContent||"";if($.length>0){/[ \t\n]$/.test($)&&(h=h.slice(1)),S=!1;break}}S&&(h=h.slice(1))}if(h[h.length-1]===" "){let E=c,S=!0;for(;E!==null&&(E=eu(E,!0))!==null;)if((E.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){S=!1;break}S&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Kn(h)}}const Qc=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function eu(g,c){let h=g;for(;;){let E;for(;(E=c?h.nextSibling:h.previousSibling)===null;){const $=h.parentElement;if($===null)return null;h=$}if(h=E,h.nodeType===We){const $=h.style.display;if($===""&&h.nodeName.match(Qc)===null||$!==""&&!$.startsWith("inline"))return null}let S=h;for(;(S=c?h.firstChild:h.lastChild)!==null;)h=S;if(h.nodeType===Xe)return h;if(h.nodeName==="BR")return null}}const us={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function no(g){const c=us[g.nodeName.toLowerCase()];return c===void 0?{node:null}:{forChild:h=>(St(h)&&!h.hasFormat(c)&&h.toggleFormat(c),h),node:null}}function Kn(g=""){return ha(new ci(g))}function St(g){return g instanceof ci}class ui extends ci{static getType(){return"tab"}static clone(c){const h=new ui(c.__key);return h.__text=c.__text,h.__format=c.__format,h.__style=c.__style,h}constructor(c){super(" ",c),this.__detail=lt}static importDOM(){return null}static importJSON(c){const h=Na();return h.setFormat(c.format),h.setStyle(c.style),h}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(c){throw Error("TabNode does not support setTextContent")}setDetail(c){throw Error("TabNode does not support setDetail")}setMode(c){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Na(){return ha(new ui)}function ds(g){return g instanceof ui}class il{constructor(c,h,E){this._selection=null,this.key=c,this.offset=h,this.type=E}is(c){return this.key===c.key&&this.offset===c.offset&&this.type===c.type}isBefore(c){let h=this.getNode(),E=c.getNode();const S=this.offset,$=c.offset;return rt(h)&&(h=h.getDescendantByIndex(S)??h),rt(E)&&(E=E.getDescendantByIndex($)??E),h===E?S<$:h.isBefore(E)}getNode(){const c=this.key,h=Fn(c);if(h===null)throw Error("Point.getNode: node not found");return h}set(c,h,E){const S=this._selection,$=this.key;this.key=c,this.offset=h,this.type=E,ul()||(Xr()===$&&Pn(c),S!==null&&(S.setCachedNodes(null),S.dirty=!0))}}function rr(g,c,h){return new il(g,c,h)}function tu(g,c){let h=c.__key,E=g.offset,S="element";if(St(c)){S="text";const $=c.getTextContentSize();E>$&&(E=$)}else if(!rt(c)){const $=c.getNextSibling();if(St($))h=$.__key,E=0,S="text";else{const G=c.getParent();G&&(h=G.__key,E=c.getIndexWithinParent()+1)}}g.set(h,E,S)}function al(g,c){if(rt(c)){const h=c.getLastDescendant();rt(h)||St(h)?tu(g,h):tu(g,c)}else tu(g,c)}function Nd(g,c,h,E){const S=g.getNode(),$=S.getChildAtIndex(g.offset),G=Kn(),V=oo(S)?zi().append(G):G;G.setFormat(h),G.setStyle(E),$===null?S.append(V):$.insertBefore(V),g.is(c)&&c.set(G.__key,0,"text"),g.set(G.__key,0,"text")}function Mo(g,c,h,E){g.key=c,g.offset=h,g.type=E}class sl{constructor(c,h){this.anchor=c,this.focus=h,c._selection=this,h._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return or(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Io(this)}}class pn{constructor(c){this.dirty=!1,this._nodes=c,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){if(!yr(c))return!1;const h=this._nodes,E=c._nodes;return h.size===E.size&&Array.from(h).every(S=>E.has(S))}add(c){this.dirty=!0,this._nodes.add(c),this._cachedNodes=null}delete(c){this.dirty=!0,this._nodes.delete(c),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(c){return this._nodes.has(c)}clone(){return new pn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.getNodes(),E=h.length,S=h[E-1];let $;if(St(S))$=S.select();else{const G=S.getIndexWithinParent()+1;$=S.getParentOrThrow().select(G,G)}$.insertNodes(c);for(let G=0;G<E;G++)h[G].remove()}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this._nodes,E=[];for(const S of h){const $=Fn(S);$!==null&&E.push($)}return ul()||(this._cachedNodes=E),E}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Tt(g){return g instanceof ir}function or(g){return g instanceof sl}function Hr(g){const[c,,h]=Oy(g),E=h.getChildren(),S=E.length,$=E[0].getChildren().length,G=new Array(S);for(let V=0;V<S;V++)G[V]=new Array($);for(let V=0;V<S;V++){const be=E[V].getChildren();let ye=0;for(let Ne=0;Ne<be.length;Ne++){for(;G[V][ye];)ye++;const we=be[Ne],Ae=we.__rowSpan||1,Te=we.__colSpan||1;for(let He=0;He<Ae;He++)for(let Le=0;Le<Te;Le++)G[V+He][ye+Le]=we;if(c===we)return{colSpan:Te,columnIndex:ye,rowIndex:V,rowSpan:Ae};ye+=Te}}return null}class di extends sl{constructor(c,h,E){super(h,E),this.gridKey=c}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Fr(c)?this.gridKey===c.gridKey&&this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}set(c,h,E){this.dirty=!0,this.gridKey=c,this.anchor.key=h,this.focus.key=E,this._cachedNodes=null}clone(){return new di(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.focus.getNode();sa(h.select(0,h.getChildrenSize())).insertNodes(c)}getShape(){const c=Fn(this.anchor.key);if(!_o(c))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const h=Hr(c);if(h===null)throw Error("getCellRect: expected to find AnchorNode");const E=Fn(this.focus.key);if(!_o(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const S=Hr(E);if(S===null)throw Error("getCellRect: expected to find focusCellNode");const $=Math.min(h.columnIndex,S.columnIndex),G=Math.max(h.columnIndex,S.columnIndex),V=Math.min(h.rowIndex,S.rowIndex),be=Math.max(h.rowIndex,S.rowIndex);return{fromX:Math.min($,G),fromY:Math.min(V,be),toX:Math.max($,G),toY:Math.max(V,be)}}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor.getNode(),E=this.focus.getNode(),S=Mi(h,_o),$=Mi(E,_o);if(!_o(S))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!_o($))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const G=S.getParent();if(!ou(G))throw Error("Expected anchorCell to have a parent GridRowNode");const V=G.getParent();if(!Mh(V))throw Error("Expected tableNode to have a parent GridNode");const be=$.getParents()[1];if(be!==V){if(V.isParentOf($)){const jt=be.getParent();if(jt==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,$.getKey(),jt.getKey())}else{const jt=V.getParent();if(jt==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,jt.getKey(),$.getKey())}return this.getNodes()}const[ye,Ne,we]=Sy(V,S,$);let Ae=Math.min(Ne.startColumn,we.startColumn),Te=Math.min(Ne.startRow,we.startRow),He=Math.max(Ne.startColumn+Ne.cell.__colSpan-1,we.startColumn+we.cell.__colSpan-1),Le=Math.max(Ne.startRow+Ne.cell.__rowSpan-1,we.startRow+we.cell.__rowSpan-1),Je=Ae,ft=Te,Ye=Ae,Ft=Te;function Ht(jt){const{cell:Jt,startColumn:cn,startRow:Wt}=jt;Ae=Math.min(Ae,cn),Te=Math.min(Te,Wt),He=Math.max(He,cn+Jt.__colSpan-1),Le=Math.max(Le,Wt+Jt.__rowSpan-1)}for(;Ae<Je||Te<ft||He>Ye||Le>Ft;){if(Ae<Je){const jt=Ft-ft,Jt=Je-1;for(let cn=0;cn<=jt;cn++)Ht(ye[ft+cn][Jt]);Je=Jt}if(Te<ft){const jt=Ye-Je,Jt=ft-1;for(let cn=0;cn<=jt;cn++)Ht(ye[Jt][Je+cn]);ft=Jt}if(He>Ye){const jt=Ft-ft,Jt=Ye+1;for(let cn=0;cn<=jt;cn++)Ht(ye[ft+cn][Jt]);Ye=Jt}if(Le>Ft){const jt=Ye-Je,Jt=Ft+1;for(let cn=0;cn<=jt;cn++)Ht(ye[Jt][Je+cn]);Ft=Jt}}const Pt=[V];let Zt=null;for(let jt=Te;jt<=Le;jt++)for(let Jt=Ae;Jt<=He;Jt++){const{cell:cn}=ye[jt][Jt],Wt=cn.getParent();if(!ou(Wt))throw Error("Expected GridCellNode parent to be a GridRowNode");Wt!==Zt&&Pt.push(Wt),Pt.push(cn,...gd(cn)),Zt=Wt}return ul()||(this._cachedNodes=Pt),Pt}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Fr(g){return g instanceof di}class ir extends sl{constructor(c,h,E,S){super(c,h),this.format=E,this.style=S}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Tt(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus)&&this.format===c.format&&this.style===c.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor,E=this.focus,S=h.isBefore(E),$=S?h:E,G=S?E:h;let V=$.getNode(),be=G.getNode();const ye=$.offset,Ne=G.offset;if(rt(V)&&(V=V.getDescendantByIndex(ye)??V),rt(be)){let Ae=be.getDescendantByIndex(Ne);Ae!==null&&Ae!==V&&be.getChildAtIndex(Ne)===Ae&&(Ae=Ae.getPreviousSibling()),be=Ae??be}let we;return V.is(be)?rt(V)&&V.getChildrenSize()>0?we=[]:we=[V]:we=V.getNodesBetween(be),ul()||(this._cachedNodes=we),we}setTextNodeRange(c,h,E,S){Mo(this.anchor,c.__key,h,"text"),Mo(this.focus,E.__key,S,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const c=this.getNodes();if(c.length===0)return"";const h=c[0],E=c[c.length-1],S=this.anchor,$=this.focus,G=S.isBefore($),[V,be]=Io(this);let ye="",Ne=!0;for(let we=0;we<c.length;we++){const Ae=c[we];if(rt(Ae)&&!Ae.isInline())Ne||(ye+=`
239
- `),Ae.isEmpty()?Ne=!1:Ne=!0;else if(Ne=!1,St(Ae)){let Te=Ae.getTextContent();Ae===h?Ae===E?(S.type!=="element"||$.type!=="element"||$.offset===S.offset)&&(Te=V<be?Te.slice(V,be):Te.slice(be,V)):Te=G?Te.slice(V):Te.slice(be):Ae===E&&(Te=G?Te.slice(0,be):Te.slice(0,V)),ye+=Te}else(zn(Ae)||ko(Ae))&&(Ae!==E||!this.isCollapsed())&&(ye+=Ae.getTextContent())}return ye}applyDOMRange(c){const h=Dn(),E=h.getEditorState()._selection,S=Cy(c.startContainer,c.startOffset,c.endContainer,c.endOffset,h,E);if(S===null)return;const[$,G]=S;Mo(this.anchor,$.key,$.offset,$.type),Mo(this.focus,G.key,G.offset,G.type),this._cachedNodes=null}clone(){const c=this.anchor,h=this.focus;return new ir(rr(c.key,c.offset,c.type),rr(h.key,h.offset,h.type),this.format,this.style)}toggleFormat(c){this.format=er(this.format,c,null),this.dirty=!0}setStyle(c){this.style=c,this.dirty=!0}hasFormat(c){const h=Sr[c];return(this.format&h)!==0}insertRawText(c){const h=c.split(/(\r?\n|\t)/),E=[],S=h.length;for(let $=0;$<S;$++){const G=h[$];G===`
240
- `||G===`\r
241
- `?E.push(Rr()):G===" "?E.push(Na()):E.push(Kn(G))}this.insertNodes(E)}insertText(c){const h=this.anchor,E=this.focus,S=this.isCollapsed()||h.isBefore(E),$=this.format,G=this.style;S&&h.type==="element"?Nd(h,E,$,G):!S&&E.type==="element"&&Nd(E,h,$,G);const V=this.getNodes(),be=V.length,ye=S?h:E,Ne=S?E:h,we=ye.offset,Ae=Ne.offset;let Te=V[0];if(!St(Te))throw Error("insertText: first node is not a text node");const He=Te.getTextContent().length,Le=Te.getParentOrThrow(),Je=be-1;let ft=V[Je];if(this.isCollapsed()&&we===He&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextAfter()||!Le.canInsertTextAfter()&&Te.getNextSibling()===null)){let Ye=Te.getNextSibling();if((!St(Ye)||!Ye.canInsertTextBefore()||js(Ye))&&(Ye=Kn(),Ye.setFormat($),Le.canInsertTextAfter()?Te.insertAfter(Ye):Le.insertAfter(Ye)),Ye.select(0,0),Te=Ye,c!==""){this.insertText(c);return}}else if(this.isCollapsed()&&we===0&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextBefore()||!Le.canInsertTextBefore()&&Te.getPreviousSibling()===null)){let Ye=Te.getPreviousSibling();if((!St(Ye)||js(Ye))&&(Ye=Kn(),Ye.setFormat($),Le.canInsertTextBefore()?Te.insertBefore(Ye):Le.insertBefore(Ye)),Ye.select(),Te=Ye,c!==""){this.insertText(c);return}}else if(Te.isSegmented()&&we!==He){const Ye=Kn(Te.getTextContent());Ye.setFormat($),Te.replace(Ye),Te=Ye}else if(!this.isCollapsed()&&c!==""){const Ye=ft.getParent();if(!Le.canInsertTextBefore()||!Le.canInsertTextAfter()||rt(Ye)&&(!Ye.canInsertTextBefore()||!Ye.canInsertTextAfter())){this.insertText(""),Ey(this.anchor,this.focus,null),this.insertText(c);return}}if(be===1){if(Te.isToken()){const Pt=Kn(c);Pt.select(),Te.replace(Pt);return}const Ye=Te.getFormat(),Ft=Te.getStyle();if(we===Ae&&(Ye!==$||Ft!==G))if(Te.getTextContent()==="")Te.setFormat($),Te.setStyle(G);else{const Pt=Kn(c);if(Pt.setFormat($),Pt.setStyle(G),Pt.select(),we===0)Te.insertBefore(Pt,!1);else{const[Zt]=Te.splitText(we);Zt.insertAfter(Pt,!1)}Pt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);return}else if(ds(Te)){const Pt=Kn(c);Pt.setFormat($),Pt.setStyle(G),Pt.select(),Te.replace(Pt);return}const Ht=Ae-we;Te=Te.spliceText(we,Ht,c,!0),Te.getTextContent()===""?Te.remove():this.anchor.type==="text"&&(Te.isComposing()?this.anchor.offset-=c.length:(this.format=Ye,this.style=Ft))}else{const Ye=new Set([...Te.getParentKeys(),...ft.getParentKeys()]),Ft=rt(Te)?Te:Te.getParentOrThrow();let Ht=rt(ft)?ft:ft.getParentOrThrow(),Pt=ft;if(!Ft.is(Ht)&&Ht.isInline())do Pt=Ht,Ht=Ht.getParentOrThrow();while(Ht.isInline());if(Ne.type==="text"&&(Ae!==0||ft.getTextContent()==="")||Ne.type==="element"&&ft.getIndexWithinParent()<Ae)if(St(ft)&&!ft.isToken()&&Ae!==ft.getTextContentSize()){if(ft.isSegmented()){const Wt=Kn(ft.getTextContent());ft.replace(Wt),ft=Wt}!oo(Ne.getNode())&&Ne.type==="text"&&(ft=ft.spliceText(0,Ae,"")),Ye.add(ft.__key)}else{const Wt=ft.getParentOrThrow();!Wt.canBeEmpty()&&Wt.getChildrenSize()===1?Wt.remove():ft.remove()}else Ye.add(ft.__key);const Zt=Ht.getChildren(),jt=new Set(V),Jt=Ft.is(Ht),cn=Ft.isInline()&&Te.getNextSibling()===null?Ft:Te;for(let Wt=Zt.length-1;Wt>=0;Wt--){const Hn=Zt[Wt];if(Hn.is(Te)||rt(Hn)&&Hn.isParentOf(Te))break;Hn.isAttached()&&(!jt.has(Hn)||Hn.is(Pt)?Jt||cn.insertAfter(Hn,!1):Hn.remove())}if(!Jt){let Wt=Ht,Hn=null;for(;Wt!==null;){const Lo=Wt.getChildren(),Hi=Lo.length;(Hi===0||Lo[Hi-1].is(Hn))&&(Ye.delete(Wt.__key),Hn=Wt),Wt=Wt.getParent()}}if(!Te.isToken())Te=Te.spliceText(we,He-we,c,!0),Te.getTextContent()===""?Te.remove():Te.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);else if(we===He)Te.select();else{const Wt=Kn(c);Wt.select(),Te.replace(Wt)}for(let Wt=1;Wt<be;Wt++){const Hn=V[Wt],Lo=Hn.__key;Ye.has(Lo)||Hn.remove()}}}removeText(){this.insertText("")}formatText(c){if(this.isCollapsed()){this.toggleFormat(c),Pn(null);return}const h=this.getNodes(),E=[];for(const Ye of h)St(Ye)&&E.push(Ye);const S=E.length;if(S===0){this.toggleFormat(c),Pn(null);return}const $=this.anchor,G=this.focus,V=this.isBackward(),be=V?G:$,ye=V?$:G;let Ne=0,we=E[0],Ae=be.type==="element"?0:be.offset;if(be.type==="text"&&Ae===we.getTextContentSize()&&(Ne=1,we=E[1],Ae=0),we==null)return;const Te=we.getFormatFlags(c,null),He=S-1;let Le=E[He];const Je=ye.type==="text"?ye.offset:Le.getTextContentSize();if(we.is(Le)){if(Ae===Je)return;if(Ae===0&&Je===we.getTextContentSize())we.setFormat(Te);else{const Ye=we.splitText(Ae,Je),Ft=Ae===0?Ye[0]:Ye[1];Ft.setFormat(Te),be.type==="text"&&be.set(Ft.__key,0,"text"),ye.type==="text"&&ye.set(Ft.__key,Je-Ae,"text")}this.format=Te;return}Ae!==0&&([,we]=we.splitText(Ae),Ae=0),we.setFormat(Te);const ft=Le.getFormatFlags(c,Te);Je>0&&(Je!==Le.getTextContentSize()&&([Le]=Le.splitText(Je)),Le.setFormat(ft));for(let Ye=Ne+1;Ye<He;Ye++){const Ft=E[Ye];if(!Ft.isToken()){const Ht=Ft.getFormatFlags(c,ft);Ft.setFormat(Ht)}}be.type==="text"&&be.set(we.__key,Ae,"text"),ye.type==="text"&&ye.set(Le.__key,Je,"text"),this.format=Te|ft}insertNodes(c){if(c.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Le=_n();if(!Tt(Le))throw Error("Expected RangeSelection after insertParagraph");return Le.insertNodes(c)}const h=rs(this.anchor.getNode(),ga),E=c[c.length-1];if("__language"in h){if("__language"in c[0])this.insertText(c[0].getTextContent());else{const Le=Oh(this);h.splice(Le,0,c),E.selectEnd()}return}const S=Le=>(rt(Le)||zn(Le))&&!Le.isInline();if(!c.some(S)){const Le=Oh(this);h.splice(Le,0,c),E.selectEnd();return}const $=E1(c),G=$.getLastDescendant(),V=$.getChildren(),be=Le=>"__value"in Le&&"__checked"in Le,ye=Le=>rt(Le)&&ga(Le)&&!Le.isEmpty()&&rt(h)&&(!h.isEmpty()||be(h)),Ne=!rt(h)||!h.isEmpty()?this.insertParagraph():null,we=V[V.length-1];let Ae=V[0];ye(Ae)&&(h.append(...Ae.getChildren()),Ae=V[1]),Ae&&$n(h,Ae);const Te=rs(G,ga);Ne&&rt(Te)&&(be(Ne)||ga(we))&&(Te.append(...Ne.getChildren()),Ne.remove()),rt(h)&&h.isEmpty()&&h.remove(),G.selectEnd();const He=rt(h)?h.getLastChild():null;ko(He)&&Te!==h&&He.remove()}insertParagraph(){if(this.anchor.key==="root"){const G=zi();return pr().splice(this.anchor.offset,0,[G]),G.select(),G}const c=Oh(this),h=rs(this.anchor.getNode(),ga),E=h.getChildAtIndex(c),S=E?[E,...E.getNextSiblings()]:[],$=h.insertNewAfter(this,!1);return $?($.append(...S),$.selectStart(),$):null}insertLineBreak(c){const h=Rr();if(this.insertNodes([h]),c){const E=h.getParentOrThrow(),S=h.getIndexWithinParent();E.select(S,S)}}extract(){const c=this.getNodes(),h=c.length,E=h-1,S=this.anchor,$=this.focus;let G=c[0],V=c[E];const[be,ye]=Io(this);if(h===0)return[];if(h===1){if(St(G)&&!this.isCollapsed()){const we=be>ye?ye:be,Ae=be>ye?be:ye,Te=G.splitText(we,Ae),He=we===0?Te[0]:Te[1];return He!=null?[He]:[]}return[G]}const Ne=S.isBefore($);if(St(G)){const we=Ne?be:ye;we===G.getTextContentSize()?c.shift():we!==0&&([,G]=G.splitText(we),c[0]=G)}if(St(V)){const we=V.getTextContent().length,Ae=Ne?ye:be;Ae===0?c.pop():Ae!==we&&([V]=V.splitText(Ae),c[E]=V)}return c}modify(c,h,E){const S=this.focus,$=this.anchor,G=c==="move",V=fa(S,h);if(zn(V)&&!V.isIsolated()){if(G&&V.isKeyboardSelectable()){const Te=Nh();Te.add(V.__key),gr(Te);return}const Ae=h?V.getPreviousSibling():V.getNextSibling();if(St(Ae)){const Te=Ae.__key,He=h?Ae.getTextContent().length:0;S.set(Te,He,"text"),G&&$.set(Te,He,"text");return}else{const Te=V.getParentOrThrow();let He,Le;rt(Ae)?(Le=Ae.__key,He=h?Ae.getChildrenSize():0):(He=V.getIndexWithinParent(),Le=Te.__key,h||He++),S.set(Le,He,"element"),G&&$.set(Le,He,"element");return}}const be=Dn(),ye=Wr(be._window);if(!ye)return;const Ne=be._blockCursorElement,we=be._rootElement;if(we!==null&&Ne!==null&&rt(V)&&!V.isInline()&&!V.canBeEmpty()&&pa(Ne,be,we),Wi(ye,c,h?"backward":"forward",E),ye.rangeCount>0){const Ae=ye.getRangeAt(0),Te=this.anchor.getNode(),He=oo(Te)?Te:Bc(Te);if(this.applyDOMRange(Ae),this.dirty=!0,!G){const Le=this.getNodes(),Je=[];let ft=!1;for(let Ye=0;Ye<Le.length;Ye++){const Ft=Le[Ye];jn(Ft,He)?Je.push(Ft):ft=!0}if(ft&&Je.length>0)if(h){const Ye=Je[0];rt(Ye)?Ye.selectStart():Ye.getParentOrThrow().selectStart()}else{const Ye=Je[Je.length-1];rt(Ye)?Ye.selectEnd():Ye.getParentOrThrow().selectEnd()}(ye.anchorNode!==Ae.startContainer||ye.anchorOffset!==Ae.startOffset)&&jr(this)}}}deleteCharacter(c){const h=this.isCollapsed();if(this.isCollapsed()){const E=this.anchor,S=this.focus;let $=E.getNode();if(!c&&(E.type==="element"&&rt($)&&E.offset===$.getChildrenSize()||E.type==="text"&&E.offset===$.getTextContentSize())){const V=$.getParent(),be=$.getNextSibling()||(V===null?null:V.getNextSibling());if(rt(be)&&be.isShadowRoot())return}const G=fa(S,c);if(zn(G)&&!G.isIsolated()){if(G.isKeyboardSelectable()&&rt($)&&$.getChildrenSize()===0){$.remove();const V=Nh();V.add(G.__key),gr(V)}else G.remove(),Dn().dispatchCommand(t,void 0);return}else if(!c&&rt(G)&&rt($)&&$.isEmpty()){$.remove(),G.selectStart();return}if(this.modify("extend",c,"character"),this.isCollapsed()){if(c&&E.offset===0&&(E.type==="element"?E.getNode():E.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const V=S.type==="text"?S.getNode():null;if($=E.type==="text"?E.getNode():null,V!==null&&V.isSegmented()){const be=S.offset,ye=V.getTextContentSize();if(V.is($)||c&&be!==ye||!c&&be!==0){nu(V,c,be);return}}else if($!==null&&$.isSegmented()){const be=E.offset,ye=$.getTextContentSize();if($.is(V)||c&&be!==0||!c&&be!==ye){nu($,c,be);return}}ll(this,c)}}if(this.removeText(),c&&!h&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const E=this.anchor.getNode();E.isEmpty()&&oo(E.getParent())&&E.getIndexWithinParent()===0&&E.collapseAtStart(this)}}deleteLine(c){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",c,"lineboundary"),(c?this.focus:this.anchor).offset===0&&this.modify("extend",c,"character")),this.removeText()}deleteWord(c){this.isCollapsed()&&this.modify("extend",c,"word"),this.removeText()}}function yr(g){return g instanceof pn}function Po(g){const c=g.offset;if(g.type==="text")return c;const h=g.getNode();return c===h.getChildrenSize()?h.getTextContent().length:0}function Io(g){const c=g.anchor,h=g.focus;return c.type==="element"&&h.type==="element"&&c.key===h.key&&c.offset===h.offset?[0,0]:[Po(c),Po(h)]}function jr(g){const c=g.focus,h=g.anchor,E=h.key,S=h.offset,$=h.type;Mo(h,c.key,c.offset,c.type),Mo(c,E,S,$),g._cachedNodes=null}function Wi(g,c,h,E){g.modify(c,h,E)}function ll(g,c){const h=g.anchor,E=g.focus,S=h.getNode(),$=E.getNode();if(S===$&&h.type==="text"&&E.type==="text"){const G=h.offset,V=E.offset,be=G<V,ye=be?G:V,Ne=be?V:G,we=Ne-1;if(ye!==we){const Ae=S.getTextContent().slice(ye,Ne);Rc(Ae)||(c?E.offset=we:h.offset=we)}}}function nu(g,c,h){const E=g,S=E.getTextContent().split(/(?=\s)/g),$=S.length;let G=0,V=0;for(let ye=0;ye<$;ye++){const Ne=S[ye],we=ye===$-1;if(V=G,G+=Ne.length,c&&G===h||G>h||we){S.splice(ye,1),we&&(V=void 0);break}}const be=S.join("").trim();be===""?E.remove():(E.setTextContent(be),E.select(V,V))}function h1(g,c,h){const E=g.getParent();return h===null||E===null||!E.canBeEmpty()||E!==h.getNode()}function _y(g,c,h,E){let S=c,$;if(g.nodeType===We){let G=!1;const V=g.childNodes,be=V.length;S===be&&(G=!0,S=be-1);let ye=V[S],Ne=!1;if(ye===E._blockCursorElement?(ye=V[S+1],Ne=!0):E._blockCursorElement!==null&&S--,$=Oi(ye),St($))S=Ka($,G);else{let we=Oi(g);if(we===null)return null;if(rt(we)){let Ae=we.getChildAtIndex(S);if(rt(Ae)&&h1(Ae,S,h)){const Te=G?Ae.getLastDescendant():Ae.getFirstDescendant();Te===null?(we=Ae,S=0):(Ae=Te,we=rt(Ae)?Ae:Ae.getParentOrThrow())}St(Ae)?($=Ae,we=null,S=Ka(Ae,G)):Ae!==we&&G&&!Ne&&S++}else{const Ae=we.getIndexWithinParent();c===0&&zn(we)&&Oi(g)===we?S=Ae:S=Ae+1,we=we.getParentOrThrow()}if(rt(we))return rr(we.__key,S,"element")}}else $=Oi(g);return St($)?rr($.__key,S,"text"):null}function xy(g,c,h){const E=g.offset,S=g.getNode();if(E===0){const $=S.getPreviousSibling(),G=S.getParent();if(!c)rt($)&&!h&&$.isInline()?(g.key=$.__key,g.offset=$.getChildrenSize(),g.type="element"):St($)&&(g.key=$.__key,g.offset=$.getTextContent().length);else if((h||!c)&&$===null&&rt(G)&&G.isInline()){const V=G.getPreviousSibling();St(V)&&(g.key=V.__key,g.offset=V.getTextContent().length)}}else if(E===S.getTextContent().length){const $=S.getNextSibling(),G=S.getParent();if(c&&rt($)&&$.isInline())g.key=$.__key,g.offset=0,g.type="element";else if((h||c)&&$===null&&rt(G)&&G.isInline()&&!G.canInsertTextAfter()){const V=G.getNextSibling();St(V)&&(g.key=V.__key,g.offset=0)}}}function Ey(g,c,h){if(g.type==="text"&&c.type==="text"){const E=g.isBefore(c),S=g.is(c);xy(g,E,S),xy(c,!E,S),S&&(c.key=g.key,c.offset=g.offset,c.type=g.type);const $=Dn();if($.isComposing()&&$._compositionKey!==g.key&&Tt(h)){const G=h.anchor,V=h.focus;Mo(g,G.key,G.offset,G.type),Mo(c,V.key,V.offset,V.type)}}}function Cy(g,c,h,E,S,$){if(g===null||h===null||!ti(S,g,h))return null;const G=_y(g,c,Tt($)?$.anchor:null,S);if(G===null)return null;const V=_y(h,E,Tt($)?$.focus:null,S);if(V===null)return null;if(G.type==="element"&&V.type==="element"){const be=Oi(g),ye=Oi(h);if(zn(be)&&zn(ye))return null}return Ey(G,V,$),[G,V]}function p1(g){return rt(g)&&!g.isInline()}function wy(g,c,h,E,S,$){const G=fi(),V=new ir(rr(g,c,S),rr(h,E,$),0,"");return V.dirty=!0,G._selection=V,V}function g1(){const g=rr("root",0,"element"),c=rr("root",0,"element");return new ir(g,c,0,"")}function Nh(){return new pn(new Set)}function m1(){const g=rr("root",0,"element"),c=rr("root",0,"element");return new di("root",g,c)}function y1(g){const c=g.getEditorState()._selection,h=Wr(g._window);return Tt(c)||c==null?Sh(c,h,g):c.clone()}function Sh(g,c,h){const E=h._window;if(E===null)return null;const S=E.event,$=S?S.type:void 0,G=$==="selectionchange",V=!at()&&(G||$==="beforeinput"||$==="compositionstart"||$==="compositionend"||$==="click"&&S&&S.detail===3||$==="drop"||$===void 0);let be,ye,Ne,we;if(!Tt(g)||V){if(c===null)return null;if(be=c.anchorNode,ye=c.focusNode,Ne=c.anchorOffset,we=c.focusOffset,G&&Tt(g)&&!ti(h,be,ye))return g.clone()}else return g.clone();const Ae=Cy(be,Ne,ye,we,h,g);if(Ae===null)return null;const[Te,He]=Ae;return new ir(Te,He,Tt(g)?g.format:0,Tt(g)?g.style:"")}function _n(){return fi()._selection}function cl(){return Dn()._editorState._selection}function Sd(g,c,h,E=1){const S=g.anchor,$=g.focus,G=S.getNode(),V=$.getNode();if(!c.is(G)&&!c.is(V))return;const be=c.__key;if(g.isCollapsed()){const ye=S.offset;if(h<=ye&&E>0||h<ye&&E<0){const Ne=Math.max(0,ye+E);S.set(be,Ne,"element"),$.set(be,Ne,"element"),Ty(g)}}else{const ye=g.isBackward(),Ne=ye?$:S,we=Ne.getNode(),Ae=ye?S:$,Te=Ae.getNode();if(c.is(we)){const He=Ne.offset;(h<=He&&E>0||h<He&&E<0)&&Ne.set(be,Math.max(0,He+E),"element")}if(c.is(Te)){const He=Ae.offset;(h<=He&&E>0||h<He&&E<0)&&Ae.set(be,Math.max(0,He+E),"element")}}Ty(g)}function Ty(g){const c=g.anchor,h=c.offset,E=g.focus,S=E.offset,$=c.getNode(),G=E.getNode();if(g.isCollapsed()){if(!rt($))return;const V=$.getChildrenSize(),be=h>=V,ye=be?$.getChildAtIndex(V-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text"),E.set(ye.__key,Ne,"text")}return}if(rt($)){const V=$.getChildrenSize(),be=h>=V,ye=be?$.getChildAtIndex(V-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text")}}if(rt(G)){const V=G.getChildrenSize(),be=S>=V,ye=be?G.getChildAtIndex(V-1):G.getChildAtIndex(S);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),E.set(ye.__key,Ne,"text")}}}function v1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(Tt(E)){const S=E.anchor,$=E.focus;let G;if(S.type==="text"&&(G=S.getNode(),G.selectionTransform(h,E)),$.type==="text"){const V=$.getNode();G!==V&&V.selectionTransform(h,E)}}}function Od(g,c,h,E,S){let $=null,G=0,V=null;E!==null?($=E.__key,St(E)?(G=E.getTextContentSize(),V="text"):rt(E)&&(G=E.getChildrenSize(),V="element")):S!==null&&($=S.__key,St(S)?V="text":rt(S)&&(V="element")),$!==null&&V!==null?g.set($,G,V):(G=c.getIndexWithinParent(),G===-1&&(G=h.getChildrenSize()),g.set(h.__key,G,"element"))}function Ny(g,c,h,E,S){g.type==="text"?(g.key=h,c||(g.offset+=S)):g.offset>E.getIndexWithinParent()&&(g.offset-=1)}function b1(g,c,h,E,S,$,G){const V=E.anchorNode,be=E.focusNode,ye=E.anchorOffset,Ne=E.focusOffset,we=document.activeElement;if(S.has("collaboration")&&we!==$||we!==null&&Nc(we))return;if(!Tt(c)){g!==null&&ti(h,V,be)&&E.removeAllRanges();return}const Ae=c.anchor,Te=c.focus,He=Ae.key,Le=Te.key,Je=ts(h,He),ft=ts(h,Le),Ye=Ae.offset,Ft=Te.offset,Ht=c.format,Pt=c.style,Zt=c.isCollapsed();let jt=Je,Jt=ft,cn=!1;if(Ae.type==="text"){jt=Rn(Je);const Wt=Ae.getNode();cn=Wt.getFormat()!==Ht||Wt.getStyle()!==Pt}else Tt(g)&&g.anchor.type==="text"&&(cn=!0);if(Te.type==="text"&&(Jt=Rn(ft)),!(jt===null||Jt===null)&&(Zt&&(g===null||cn||Tt(g)&&(g.format!==Ht||g.style!==Pt))&&it(Ht,Pt,Ye,He,performance.now()),!(ye===Ye&&Ne===Ft&&V===jt&&be===Jt&&!(E.type==="Range"&&Zt)&&((we===null||!$.contains(we))&&$.focus({preventScroll:!0}),Ae.type!=="element")))){try{E.setBaseAndExtent(jt,Ye,Jt,Ft)}catch{}if(!S.has("skip-scroll-into-view")&&c.isCollapsed()&&$!==null&&$===document.activeElement){const Wt=c instanceof ir&&c.anchor.type==="element"?jt.childNodes[Ye]||null:E.rangeCount>0?E.getRangeAt(0):null;if(Wt!==null){let Hn;if(Wt instanceof Text){const Lo=document.createRange();Lo.selectNode(Wt),Hn=Lo.getBoundingClientRect()}else Hn=Wt.getBoundingClientRect();Eh(h,Hn,$)}}Ie()}}function _1(g){let c=_n()||cl();c===null&&(c=pr().selectEnd()),c.insertNodes(g)}function x1(){const g=_n();return g===null?"":g.getTextContent()}function Sy(g,c,h){const E=[];let S=null,$=null;function G(ye,Ne,we){const Ae={cell:we,startColumn:Ne,startRow:ye},Te=we.__rowSpan,He=we.__colSpan;for(let Le=0;Le<Te;Le++){E[ye+Le]===void 0&&(E[ye+Le]=[]);for(let Je=0;Je<He;Je++)E[ye+Le][Ne+Je]=Ae}c.is(we)&&(S=Ae),h.is(we)&&($=Ae)}function V(ye,Ne){return E[ye]===void 0||E[ye][Ne]===void 0}const be=g.getChildren();for(let ye=0;ye<be.length;ye++){const Ne=be[ye];if(!ou(Ne))throw Error("Expected GridNode children to be GridRowNode");const we=Ne.getChildren();let Ae=0;for(const Te of we){if(!_o(Te))throw Error("Expected GridRowNode children to be GridCellNode");for(;!V(ye,Ae);)Ae++;G(ye,Ae,Te),Ae+=Te.__colSpan}}if(S===null)throw Error("Anchor not found in Grid");if($===null)throw Error("Focus not found in Grid");return[E,S,$]}function Oy(g){let c;if(g instanceof kh)c=g;else if(g instanceof $t){const S=Mi(g,_o);if(!_o(S))throw Error("Expected to find a parent GridCellNode");c=S}else{const S=Mi(g.getNode(),_o);if(!_o(S))throw Error("Expected to find a parent GridCellNode");c=S}const h=c.getParent();if(!ou(h))throw Error("Expected GridCellNode to have a parent GridRowNode");const E=h.getParent();if(!Mh(E))throw Error("Expected GridRowNode to have a parent GridNode");return[c,h,E]}function Oh(g){g.isCollapsed()||g.removeText();const c=g.anchor,h=c.getNode();if(!St(h))return c.offset;const E=h.getParent();if(!E){const be=zi();return pr().append(be),be.select(),0}const S=h.splitText(c.offset);if(S.length===0)return 0;const $=c.offset===0?0:1,G=S[0].getIndexWithinParent()+$;if(!E.isInline()||G===0)return G;const V=E.getChildAtIndex(G);return V&&E.insertNewAfter(g).append(V,...V.getNextSiblings()),E.getIndexWithinParent()+$}function E1(g){const c=zi();let h=null;for(let E=0;E<g.length;E++){const S=g[E],$=ko(S);if($||zn(S)&&S.isInline()||rt(S)&&S.isInline()||St(S)||S.isParentRequired()){if(h===null&&(h=S.createParentElementNode(),c.append(h),$))continue;h!==null&&h.append(S)}else c.append(S),h=null}return c}let vr=null,br=null,Gr=!1,Ah=!1,Ad=0;const Ay={characterData:!0,childList:!0,subtree:!0};function ul(){return Gr||vr!==null&&vr._readOnly}function $r(){if(Gr)throw Error("Cannot use method in read-only mode.")}function Ry(){if(Ad>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function fi(){if(vr===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return vr}function Dn(){if(br===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return br}function C1(){return br}function $y(g,c,h){const E=c.__type,S=Tc(g,E);let $=h.get(E);$===void 0&&($=Array.from(S.transforms),h.set(E,$));const G=$.length;for(let V=0;V<G&&($[V](c),!!c.isAttached());V++);}function Dy(g,c){return g!==void 0&&g.__key!==c&&g.isAttached()}function w1(g,c){const h=c._dirtyLeaves,E=g._nodeMap;for(const S of h){const $=E.get(S);St($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&Ir($)}}function T1(g,c){const h=c._dirtyLeaves,E=c._dirtyElements,S=g._nodeMap,$=Xr(),G=new Map;let V=h,be=V.size,ye=E,Ne=ye.size;for(;be>0||Ne>0;){if(be>0){c._dirtyLeaves=new Set;for(const we of V){const Ae=S.get(we);St(Ae)&&Ae.isAttached()&&Ae.isSimpleText()&&!Ae.isUnmergeable()&&Ir(Ae),Ae!==void 0&&Dy(Ae,$)&&$y(c,Ae,G),h.add(we)}if(V=c._dirtyLeaves,be=V.size,be>0){Ad++;continue}}c._dirtyLeaves=new Set,c._dirtyElements=new Map;for(const we of ye){const Ae=we[0],Te=we[1];if(Ae!=="root"&&!Te)continue;const He=S.get(Ae);He!==void 0&&Dy(He,$)&&$y(c,He,G),E.set(Ae,Te)}V=c._dirtyLeaves,be=V.size,ye=c._dirtyElements,Ne=ye.size,Ad++}c._dirtyLeaves=h,c._dirtyElements=E}function N1(g){return Rh(g,Dn()._nodes)}function Rh(g,c){const h=g.type,E=c.get(h);if(E===void 0)throw Error(`parseEditorState: type "${h}" + not found`);const S=E.klass;if(g.type!==S.getType())throw Error(`LexicalNode: Node ${S.name} does not implement .importJSON().`);const $=S.importJSON(g),G=g.children;if(rt($)&&Array.isArray(G))for(let V=0;V<G.length;V++){const be=G[V],ye=Rh(be,c);$.append(ye)}return $}function S1(g,c,h){const E=Dh(),S=vr,$=Gr,G=br,V=c._dirtyElements,be=c._dirtyLeaves,ye=c._cloneNotNeeded,Ne=c._dirtyType;c._dirtyElements=new Map,c._dirtyLeaves=new Set,c._cloneNotNeeded=new Set,c._dirtyType=0,vr=E,Gr=!1,br=c;try{const we=c._nodes,Ae=g.root;Rh(Ae,we),h&&h(),E._readOnly=!0,My(E)}catch(we){we instanceof Error&&c._onError(we)}finally{c._dirtyElements=V,c._dirtyLeaves=be,c._cloneNotNeeded=ye,c._dirtyType=Ne,vr=S,Gr=$,br=G}return E}function ky(g,c){const h=vr,E=Gr,S=br;vr=g,Gr=!0,br=null;try{return c()}finally{vr=h,Gr=E,br=S}}function My(g){const c=g._nodeMap;c.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},c.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},c.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function fs(g,c){const h=g._pendingEditorState,E=g._rootElement,S=g._headless||E===null;if(h===null)return;const $=g._editorState,G=$._selection,V=h._selection,be=g._dirtyType!==st,ye=vr,Ne=Gr,we=br,Ae=g._updating,Te=g._observer;let He=null;if(g._pendingEditorState=null,g._editorState=h,!S&&be&&Te!==null){br=g,vr=h,Gr=!1,g._updating=!0;try{const Zt=g._dirtyType,jt=g._dirtyElements,Jt=g._dirtyLeaves;Te.disconnect(),He=bd($,h,g,Zt,jt,Jt)}catch(Zt){if(Zt instanceof Error&&g._onError(Zt),!Ah)By(g,null,E,h),Cr(g),g._dirtyType=Ct,Ah=!0,fs(g,$),Ah=!1;else throw Zt;return}finally{Te.observe(E,Ay),g._updating=Ae,vr=ye,Gr=Ne,br=we}}h._readOnly||(h._readOnly=!0,My(h),Tt(V)&&(Object.freeze(V.anchor),Object.freeze(V.focus)),Object.freeze(V));const Le=g._dirtyLeaves,Je=g._dirtyElements,ft=g._normalizedNodes,Ye=g._updateTags,Ft=g._deferred;be&&(g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements=new Map,g._normalizedNodes=new Set,g._updateTags=new Set),md(g,h);const Ht=S?null:Wr(g._window);if(g._editable&&Ht!==null&&(be||V===null||V.dirty)){br=g,vr=h;try{if(Te!==null&&Te.disconnect(),be||V===null||V.dirty){const Zt=g._blockCursorElement;Zt!==null&&pa(Zt,g,E),b1(G,V,g,Ht,Ye,E)}Lt(g,E,V),Te!==null&&Te.observe(E,Ay)}finally{br=we,vr=ye}}He!==null&&A1(g,He,Ye,Le,$),!Tt(V)&&V!==null&&(G===null||!G.is(V))&&g.dispatchCommand(t,void 0);const Pt=g._pendingDecorators;Pt!==null&&(g._decorators=Pt,g._pendingDecorators=null,ru("decorator",g,!0,Pt)),O1(g,c||$,h),ru("update",g,!0,{dirtyElements:Je,dirtyLeaves:Le,editorState:h,normalizedNodes:ft,prevEditorState:c||$,tags:Ye}),$1(g,Ft),R1(g)}function O1(g,c,h){const E=Ws(c),S=Ws(h);E!==S&&ru("textcontent",g,!0,S)}function A1(g,c,h,E,S){const $=Array.from(g._listeners.mutation),G=$.length;for(let V=0;V<G;V++){const[be,ye]=$[V],Ne=c.get(ye);Ne!==void 0&&be(Ne,{dirtyLeaves:E,prevEditorState:S,updateTags:h})}}function ru(g,c,h,...E){const S=c._updating;c._updating=h;try{const $=Array.from(c._listeners[g]);for(let G=0;G<$.length;G++)$[G].apply(null,E)}finally{c._updating=S}}function Py(g,c,h){if(g._updating===!1||br!==g){let S=!1;return g.update(()=>{S=Py(g,c,h)}),S}const E=Hs(g);for(let S=4;S>=0;S--)for(let $=0;$<E.length;$++){const G=E[$]._commands.get(c);if(G!==void 0){const V=G[S];if(V!==void 0){const be=Array.from(V),ye=be.length;for(let Ne=0;Ne<ye;Ne++)if(be[Ne](h,g)===!0)return!0}}}return!1}function R1(g){const c=g._updates;if(c.length!==0){const h=c.shift();if(h){const[E,S]=h;Ly(g,E,S)}}}function $1(g,c){if(g._deferred=[],c.length!==0){const h=g._updating;g._updating=!0;try{for(let E=0;E<c.length;E++)c[E]()}finally{g._updating=h}}}function Iy(g,c){const h=g._updates;let E=c||!1;for(;h.length!==0;){const S=h.shift();if(S){const[$,G]=S;let V,be;G!==void 0&&(V=G.onUpdate,be=G.tag,G.skipTransforms&&(E=!0),V&&g._deferred.push(V),be&&g._updateTags.add(be)),$()}}return E}function Ly(g,c,h){const E=g._updateTags;let S,$,G=!1,V=!1;h!==void 0&&(S=h.onUpdate,$=h.tag,$!=null&&E.add($),G=h.skipTransforms||!1,V=h.discrete||!1),S&&g._deferred.push(S);const be=g._editorState;let ye=g._pendingEditorState,Ne=!1;(ye===null||ye._readOnly)&&(ye=g._pendingEditorState=M1(ye||be),Ne=!0),ye._flushSync=V;const we=vr,Ae=Gr,Te=br,He=g._updating;vr=ye,Gr=!1,g._updating=!0,br=g;try{Ne&&(g._headless?be._selection!=null&&(ye._selection=be._selection.clone()):ye._selection=y1(g));const Le=g._compositionKey;c(),G=Iy(g,G),v1(ye,g),g._dirtyType!==st&&(G?w1(ye,g):T1(ye,g),Iy(g),yd(be,ye,g._dirtyLeaves,g._dirtyElements));const Je=g._compositionKey;Le!==Je&&(ye._flushSync=!0);const ft=ye._selection;if(Tt(ft)){const Ye=ye._nodeMap,Ft=ft.anchor.key,Ht=ft.focus.key;if(Ye.get(Ft)===void 0||Ye.get(Ht)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else yr(ft)&&ft._nodes.size===0&&(ye._selection=null)}catch(Le){Le instanceof Error&&g._onError(Le),g._pendingEditorState=be,g._dirtyType=Ct,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),fs(g);return}finally{vr=we,Gr=Ae,br=Te,g._updating=He,Ad=0}g._dirtyType!==st||k1(ye,g)?ye._flushSync?(ye._flushSync=!1,fs(g)):Ne&&go(()=>{fs(g)}):(ye._flushSync=!1,Ne&&(E.clear(),g._deferred=[],g._pendingEditorState=null))}function ro(g,c,h){g._updating?g._updates.push([c,h]):Ly(g,c,h)}class $h extends $t{constructor(c){super(c)}decorate(c,h){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function zn(g){return g instanceof $h}class hs extends $t{constructor(c){super(c),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const c=this.getFormat();return po[c]||""}getIndent(){return this.getLatest().__indent}getChildren(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getChildrenKeys(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h.__key),h=h.getNextSibling();return c}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const c=Dn()._dirtyElements;return c!==null&&c.has(this.__key)}isLastChild(){const c=this.getLatest(),h=this.getParentOrThrow().getLastChild();return h!==null&&h.is(c)}getAllTextNodes(){const c=[];let h=this.getFirstChild();for(;h!==null;){if(St(h)&&c.push(h),rt(h)){const E=h.getAllTextNodes();c.push(...E)}h=h.getNextSibling()}return c}getFirstDescendant(){let c=this.getFirstChild();for(;c!==null;){if(rt(c)){const h=c.getFirstChild();if(h!==null){c=h;continue}}break}return c}getLastDescendant(){let c=this.getLastChild();for(;c!==null;){if(rt(c)){const h=c.getLastChild();if(h!==null){c=h;continue}}break}return c}getDescendantByIndex(c){const h=this.getChildren(),E=h.length;if(c>=E){const $=h[E-1];return rt($)&&$.getLastDescendant()||$||null}const S=h[c];return rt(S)&&S.getFirstDescendant()||S||null}getFirstChild(){const c=this.getLatest().__first;return c===null?null:Fn(c)}getFirstChildOrThrow(){const c=this.getFirstChild();if(c===null)throw Error(`Expected node ${this.__key} to have a first child.`);return c}getLastChild(){const c=this.getLatest().__last;return c===null?null:Fn(c)}getLastChildOrThrow(){const c=this.getLastChild();if(c===null)throw Error(`Expected node ${this.__key} to have a last child.`);return c}getChildAtIndex(c){const h=this.getChildrenSize();let E,S;if(c<h/2){for(E=this.getFirstChild(),S=0;E!==null&&S<=c;){if(S===c)return E;E=E.getNextSibling(),S++}return null}for(E=this.getLastChild(),S=h-1;E!==null&&S>=c;){if(S===c)return E;E=E.getPreviousSibling(),S--}return null}getTextContent(){let c="";const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContent(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Vt)}return c}getTextContentSize(){let c=0;const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContentSize(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Vt.length)}return c}getDirection(){return this.getLatest().__dir}hasFormat(c){if(c!==""){const h=Er[c];return(this.getFormat()&h)!==0}return!1}select(c,h){$r();const E=_n();let S=c,$=h;const G=this.getChildrenSize();if(!this.canBeEmpty()){if(c===0&&h===0){const be=this.getFirstChild();if(St(be)||rt(be))return be.select(0,0)}else if((c===void 0||c===G)&&(h===void 0||h===G)){const be=this.getLastChild();if(St(be)||rt(be))return be.select()}}S===void 0&&(S=G),$===void 0&&($=G);const V=this.__key;if(Tt(E))E.anchor.set(V,S,"element"),E.focus.set(V,$,"element"),E.dirty=!0;else return wy(V,S,V,$,"element","element");return E}selectStart(){const c=this.getFirstDescendant();return c?c.selectStart():this.select()}selectEnd(){const c=this.getLastDescendant();return c?c.selectEnd():this.select()}clear(){const c=this.getWritable();return this.getChildren().forEach(h=>h.remove()),c}append(...c){return this.splice(this.getChildrenSize(),0,c)}setDirection(c){const h=this.getWritable();return h.__dir=c,h}setFormat(c){const h=this.getWritable();return h.__format=c!==""?Er[c]:0,this}setIndent(c){const h=this.getWritable();return h.__indent=c,this}splice(c,h,E){const S=E.length,$=this.getChildrenSize(),G=this.getWritable(),V=G.__key,be=[],ye=[],Ne=this.getChildAtIndex(c+h);let we=null,Ae=$-h+S;if(c!==0)if(c===$)we=this.getLastChild();else{const He=this.getChildAtIndex(c);He!==null&&(we=He.getPreviousSibling())}if(h>0){let He=we===null?this.getFirstChild():we.getNextSibling();for(let Le=0;Le<h;Le++){if(He===null)throw Error("splice: sibling not found");const Je=He.getNextSibling(),ft=He.__key,Ye=He.getWritable();Jr(Ye),ye.push(ft),He=Je}}let Te=we;for(let He=0;He<S;He++){const Le=E[He];Te!==null&&Le.is(Te)&&(we=Te=Te.getPreviousSibling());const Je=Le.getWritable();Je.__parent===V&&Ae--,Jr(Je);const ft=Le.__key;if(Te===null)G.__first=ft,Je.__prev=null;else{const Ye=Te.getWritable();Ye.__next=ft,Je.__prev=Ye.__key}if(Le.__key===V)throw Error("append: attempting to append self");Je.__parent=V,be.push(ft),Te=Le}if(c+h===$){if(Te!==null){const He=Te.getWritable();He.__next=null,G.__last=Te.__key}}else if(Ne!==null){const He=Ne.getWritable();if(Te!==null){const Le=Te.getWritable();He.__prev=Te.__key,Le.__next=Ne.__key}else He.__prev=null}if(G.__size=Ae,ye.length){const He=_n();if(Tt(He)){const Le=new Set(ye),Je=new Set(be),{anchor:ft,focus:Ye}=He;Fy(ft,Le,Je)&&Od(ft,ft.getNode(),this,we,Ne),Fy(Ye,Le,Je)&&Od(Ye,Ye.getNode(),this,we,Ne),Ae===0&&!this.canBeEmpty()&&!tr(this)&&this.remove()}}return G}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(c,h){return null}canIndent(){return!0}collapseAtStart(c){return!1}excludeFromCopy(c){return!1}canExtractContents(){return!0}canReplaceWith(c){return!0}canInsertAfter(c){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(c){return!1}extractWithChild(c,h,E){return!1}}function rt(g){return g instanceof hs}function Fy(g,c,h){let E=g.getNode();for(;E;){const S=E.__key;if(c.has(S)&&!h.has(S))return!0;E=E.getParent()}return!1}class dl extends hs{static getType(){return"root"}static clone(){return new dl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const c=this.__cachedText;return(ul()||Dn()._dirtyType===st)&&c!==null?c:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(c){throw Error("replace: cannot be called on root nodes")}insertBefore(c){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(c){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(c,h){return!1}append(...c){for(let h=0;h<c.length;h++){const E=c[h];if(!rt(E)&&!zn(E))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...c)}static importJSON(c){const h=pr();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function D1(){return new dl}function oo(g){return g instanceof dl}function k1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(E!==null){if(E.dirty||!E.is(h))return!0}else if(h!==null)return!0;return!1}function M1(g){return new Rd(new Map(g._nodeMap))}function Dh(){return new Rd(new Map([["root",D1()]]))}function jy(g){const c=g.exportJSON(),h=g.constructor;if(c.type!==h.getType())throw Error(`LexicalNode: Node ${h.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const E=c.children;if(rt(g)){if(!Array.isArray(E))throw Error(`LexicalNode: Node ${h.name} is an element but .exportJSON() does not have a children array.`);const S=g.getChildren();for(let $=0;$<S.length;$++){const G=S[$],V=jy(G);E.push(V)}}return c}class Rd{constructor(c,h){this._nodeMap=c,this._selection=h||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(c){return ky(this,c)}clone(c){const h=new Rd(this._nodeMap,c===void 0?this._selection:c);return h._readOnly=!0,h}toJSON(){return ky(this,()=>({root:jy(pr())}))}}class fl extends hs{static getType(){return"paragraph"}static clone(c){return new fl(c.__key)}createDOM(c){const h=document.createElement("p"),E=ki(c.theme,"paragraph");return E!==void 0&&h.classList.add(...E),h}updateDOM(c,h,E){return!1}static importDOM(){return{p:c=>({conversion:P1,priority:0})}}exportDOM(c){const{element:h}=super.exportDOM(c);if(h&&ii(h)){this.isEmpty()&&h.append(document.createElement("br"));const E=this.getFormatType();h.style.textAlign=E;const S=this.getDirection();S&&(h.dir=S);const $=this.getIndent();$>0&&(h.style.textIndent=`${$*20}px`)}return{element:h}}static importJSON(c){const h=zi();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(c,h){const E=zi(),S=this.getDirection();return E.setDirection(S),this.insertAfter(E,h),E}collapseAtStart(){const c=this.getChildren();if(c.length===0||St(c[0])&&c[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function P1(g){const c=zi();if(g.style){c.setFormat(g.style.textAlign);const h=parseInt(g.style.textIndent,10)/20;h>0&&c.setIndent(h)}return{node:c}}function zi(){return ha(new fl)}function I1(g){return g instanceof fl}const L1=0,F1=1,j1=2,B1=3,W1=4;function By(g,c,h,E){const S=g._keyToDOMMap;S.clear(),g._editorState=Dh(),g._pendingEditorState=E,g._compositionKey=null,g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),g._normalizedNodes=new Set,g._updateTags=new Set,g._updates=[],g._blockCursorElement=null;const $=g._observer;$!==null&&($.disconnect(),g._observer=null),c!==null&&(c.textContent=""),h!==null&&(h.textContent="",S.set("root",h))}function z1(g,c){const h=new Map,E=new Set,S=$=>{Object.keys($).forEach(G=>{let V=h.get(G);V===void 0&&(V=[],h.set(G,V)),V.push($[G])})};return g.forEach($=>{const G=$.klass.importDOM!=null?$.klass.importDOM.bind($.klass):null;if(G==null||E.has(G))return;E.add(G);const V=G();V!==null&&S(V)}),c&&S(c),h}function H1(g){const c=g||{},h=C1(),E=c.theme||{},S=g===void 0?h:c.parentEditor||null,$=c.disableEvents||!1,G=Dh(),V=c.namespace||(S!==null?S._config.namespace:$c()),be=c.editorState,ye=[dl,ci,Xn,ui,fl,...c.nodes||[]],{onError:Ne,html:we}=c,Ae=c.editable!==void 0?c.editable:!0;let Te;if(g===void 0&&h!==null)Te=h._nodes;else{Te=new Map;for(let Le=0;Le<ye.length;Le++){let Je=ye[Le],ft=null,Ye=null;if(typeof Je!="function"){const Zt=Je;Je=Zt.replace,ft=Zt.with,Ye=Zt.withKlass||null}{const Zt=Je.name;if(Zt!=="RootNode"){const jt=Je.prototype;["getType","clone"].forEach(Jt=>{Je.hasOwnProperty(Jt)||console.warn(`${Zt} must implement static "${Jt}" method`)}),!Je.hasOwnProperty("importDOM")&&Je.hasOwnProperty("exportDOM")&&console.warn(`${Zt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),jt instanceof $h&&(jt.hasOwnProperty("decorate")||console.warn(`${jt.constructor.name} must implement "decorate" method`)),Je.hasOwnProperty("importJSON")||console.warn(`${Zt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),jt.hasOwnProperty("exportJSON")||console.warn(`${Zt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const Ft=Je.getType(),Ht=Je.transform(),Pt=new Set;Ht!==null&&Pt.add(Ht),Te.set(Ft,{exportDOM:we&&we.export?we.export.get(Je):void 0,klass:Je,replace:ft,replaceWithKlass:Ye,transforms:Pt})}}const He=new G1(G,S,Te,{disableEvents:$,namespace:V,theme:E},Ne||console.error,z1(Te,we?we.import:void 0),Ae);return be!==void 0&&(He._pendingEditorState=be,He._dirtyType=Ct),He}class G1{constructor(c,h,E,S,$,G,V){this._parentEditor=h,this._rootElement=null,this._editorState=c,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=S,this._nodes=E,this._decorators={},this._pendingDecorators=null,this._dirtyType=st,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=$c(),this._onError=$,this._htmlConversions=G,this._editable=V,this._headless=h!==null&&h._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(c){const h=this._listeners.update;return h.add(c),()=>{h.delete(c)}}registerEditableListener(c){const h=this._listeners.editable;return h.add(c),()=>{h.delete(c)}}registerDecoratorListener(c){const h=this._listeners.decorator;return h.add(c),()=>{h.delete(c)}}registerTextContentListener(c){const h=this._listeners.textcontent;return h.add(c),()=>{h.delete(c)}}registerRootListener(c){const h=this._listeners.root;return c(this._rootElement,null),h.add(c),()=>{c(null,this._rootElement),h.delete(c)}}registerCommand(c,h,E){if(E===void 0)throw Error('Listener for type "command" requires a "priority".');const S=this._commands;S.has(c)||S.set(c,[new Set,new Set,new Set,new Set,new Set]);const $=S.get(c);if($===void 0)throw Error(`registerCommand: Command ${String(c)} not found in command map`);const G=$[E];return G.add(h),()=>{G.delete(h),$.every(V=>V.size===0)&&S.delete(c)}}registerMutationListener(c,h){if(this._nodes.get(c.getType())===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);const E=this._listeners.mutation;return E.set(h,c),()=>{E.delete(h)}}registerNodeTransformToKlass(c,h){const E=c.getType(),S=this._nodes.get(E);if(S===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);return S.transforms.add(h),S}registerNodeTransform(c,h){const E=this.registerNodeTransformToKlass(c,h),S=[E],$=E.replaceWithKlass;if($!=null){const G=this.registerNodeTransformToKlass($,h);S.push(G)}return Va(this,c.getType()),()=>{S.forEach(G=>G.transforms.delete(h))}}hasNode(c){return this._nodes.has(c.getType())}hasNodes(c){return c.every(this.hasNode.bind(this))}dispatchCommand(c,h){return mt(this,c,h)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(c){const h=this._rootElement;if(c!==h){const E=ki(this._config.theme,"root"),S=this._pendingEditorState||this._editorState;if(this._rootElement=c,By(this,h,c,S),h!==null&&(this._config.disableEvents||Ze(h),E!=null&&h.classList.remove(...E)),c!==null){const $=Nt(c),G=c.style;G.userSelect="text",G.whiteSpace="pre-wrap",G.wordBreak="break-word",c.setAttribute("data-lexical-editor","true"),this._window=$,this._dirtyType=Ct,Cr(this),this._updateTags.add("history-merge"),fs(this),this._config.disableEvents||Ue(c,this),E!=null&&c.classList.add(...E)}else this._editorState=S,this._pendingEditorState=null,this._window=null;ru("root",this,!1,c,h)}}getElementByKey(c){return this._keyToDOMMap.get(c)||null}getEditorState(){return this._editorState}setEditorState(c,h){if(c.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");mn(this);const E=this._pendingEditorState,S=this._updateTags,$=h!==void 0?h.tag:null;E!==null&&!E.isEmpty()&&($!=null&&S.add($),fs(this)),this._pendingEditorState=c,this._dirtyType=Ct,this._dirtyElements.set("root",!1),this._compositionKey=null,$!=null&&S.add($),fs(this)}parseEditorState(c,h){const E=typeof c=="string"?JSON.parse(c):c;return S1(E,this,h)}update(c,h){ro(this,c,h)}focus(c,h={}){const E=this._rootElement;E!==null&&(E.setAttribute("autocapitalize","off"),ro(this,()=>{const S=_n(),$=pr();S!==null?S.dirty=!0:$.getChildrenSize()!==0&&(h.defaultSelection==="rootStart"?$.selectStart():$.selectEnd())},{onUpdate:()=>{E.removeAttribute("autocapitalize"),c&&c()},tag:"focus"}),this._pendingEditorState===null&&E.removeAttribute("autocapitalize"))}blur(){const c=this._rootElement;c!==null&&c.blur();const h=Wr(this._window);h!==null&&h.removeAllRanges()}isEditable(){return this._editable}setEditable(c){this._editable!==c&&(this._editable=c,ru("editable",this,!0,c))}toJSON(){return{editorState:this._editorState.toJSON()}}}class kh extends hs{constructor(c,h){super(h),this.__colSpan=c,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(c){return this.getWritable().__colSpan=c,this}getRowSpan(){return this.__rowSpan}setRowSpan(c){return this.getWritable().__rowSpan=c,this}}function _o(g){return g instanceof kh}class Wy extends hs{}function Mh(g){return g instanceof Wy}class zy extends hs{}function ou(g){return g instanceof zy}return Ve.$INTERNAL_isPointSelection=or,Ve.$addUpdateTag=Ch,Ve.$applyNodeReplacement=ha,Ve.$copyNode=qs,Ve.$createLineBreakNode=Rr,Ve.$createNodeSelection=Nh,Ve.$createParagraphNode=zi,Ve.$createRangeSelection=g1,Ve.$createTabNode=Na,Ve.$createTextNode=Kn,Ve.$getAdjacentNode=fa,Ve.$getNearestNodeFromDOMNode=Qr,Ve.$getNearestRootOrShadowRoot=Bc,Ve.$getNodeByKey=Fn,Ve.$getPreviousSelection=cl,Ve.$getRoot=pr,Ve.$getSelection=_n,Ve.$getTextContent=x1,Ve.$hasAncestor=jn,Ve.$hasUpdateTag=pd,Ve.$insertNodes=_1,Ve.$isBlockElementNode=p1,Ve.$isDecoratorNode=zn,Ve.$isElementNode=rt,Ve.$isInlineElementOrDecoratorNode=Ys,Ve.$isLeafNode=No,Ve.$isLineBreakNode=ko,Ve.$isNodeSelection=yr,Ve.$isParagraphNode=I1,Ve.$isRangeSelection=Tt,Ve.$isRootNode=oo,Ve.$isRootOrShadowRoot=tr,Ve.$isTabNode=ds,Ve.$isTextNode=St,Ve.$nodesOfType=jc,Ve.$normalizeSelection__EXPERIMENTAL=sa,Ve.$parseSerializedNode=N1,Ve.$selectAll=Di,Ve.$setCompositionKey=Pn,Ve.$setSelection=gr,Ve.$splitNode=Wc,Ve.BLUR_COMMAND=q,Ve.CAN_REDO_COMMAND=w,Ve.CAN_UNDO_COMMAND=N,Ve.CLEAR_EDITOR_COMMAND=J,Ve.CLEAR_HISTORY_COMMAND=F,Ve.CLICK_COMMAND=n,Ve.COMMAND_PRIORITY_CRITICAL=W1,Ve.COMMAND_PRIORITY_EDITOR=L1,Ve.COMMAND_PRIORITY_HIGH=B1,Ve.COMMAND_PRIORITY_LOW=F1,Ve.COMMAND_PRIORITY_NORMAL=j1,Ve.CONTROLLED_TEXT_INSERTION_COMMAND=a,Ve.COPY_COMMAND=re,Ve.CUT_COMMAND=B,Ve.DELETE_CHARACTER_COMMAND=r,Ve.DELETE_LINE_COMMAND=m,Ve.DELETE_WORD_COMMAND=p,Ve.DEPRECATED_$computeGridMap=Sy,Ve.DEPRECATED_$createGridSelection=m1,Ve.DEPRECATED_$getGridCellNodeRect=Hr,Ve.DEPRECATED_$getNodeTriplet=Oy,Ve.DEPRECATED_$isGridCellNode=_o,Ve.DEPRECATED_$isGridNode=Mh,Ve.DEPRECATED_$isGridRowNode=ou,Ve.DEPRECATED_$isGridSelection=Fr,Ve.DEPRECATED_GridCellNode=kh,Ve.DEPRECATED_GridNode=Wy,Ve.DEPRECATED_GridRowNode=zy,Ve.DRAGEND_COMMAND=ee,Ve.DRAGOVER_COMMAND=j,Ve.DRAGSTART_COMMAND=U,Ve.DROP_COMMAND=ne,Ve.DecoratorNode=$h,Ve.ElementNode=hs,Ve.FOCUS_COMMAND=I,Ve.FORMAT_ELEMENT_COMMAND=fe,Ve.FORMAT_TEXT_COMMAND=b,Ve.INDENT_CONTENT_COMMAND=de,Ve.INSERT_LINE_BREAK_COMMAND=o,Ve.INSERT_PARAGRAPH_COMMAND=i,Ve.INSERT_TAB_COMMAND=Q,Ve.KEY_ARROW_DOWN_COMMAND=P,Ve.KEY_ARROW_LEFT_COMMAND=O,Ve.KEY_ARROW_RIGHT_COMMAND=v,Ve.KEY_ARROW_UP_COMMAND=k,Ve.KEY_BACKSPACE_COMMAND=X,Ve.KEY_DELETE_COMMAND=Z,Ve.KEY_DOWN_COMMAND=y,Ve.KEY_ENTER_COMMAND=M,Ve.KEY_ESCAPE_COMMAND=oe,Ve.KEY_MODIFIER_COMMAND=ue,Ve.KEY_SPACE_COMMAND=Y,Ve.KEY_TAB_COMMAND=K,Ve.LineBreakNode=Xn,Ve.MOVE_TO_END=T,Ve.MOVE_TO_START=R,Ve.OUTDENT_CONTENT_COMMAND=pe,Ve.PASTE_COMMAND=l,Ve.ParagraphNode=fl,Ve.REDO_COMMAND=_,Ve.REMOVE_TEXT_COMMAND=u,Ve.RootNode=dl,Ve.SELECTION_CHANGE_COMMAND=t,Ve.SELECT_ALL_COMMAND=W,Ve.TabNode=ui,Ve.TextNode=ci,Ve.UNDO_COMMAND=C,Ve.createCommand=e,Ve.createEditor=H1,Ve.getNearestEditorFromDOMNode=Si,Ve.isHTMLAnchorElement=Pi,Ve.isHTMLElement=ii,Ve.isSelectionCapturedInDecoratorInput=Nc,Ve.isSelectionWithinEditor=ti,Ve}var Ke={},Lb;function X9(){if(Lb)return Ke;Lb=1;let e={},t={},n={},r={},o={},i={},a={},l={},u={},p={},m={},b={},C={},_={},y={},v={},T={},O={},R={},k={},P={},M={},Y={},X={},oe={},Z={},K={},Q={},de={},pe={},ne={},fe={},U={},j={},ee={},re={};function B(f){let s=new URLSearchParams;s.append("code",f);for(let d=1;d<arguments.length;d++)s.append("v",arguments[d]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${s} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let W=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",J=W&&"documentMode"in document?document.documentMode:null,F=W&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w=W&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),N=W&&"InputEvent"in window&&!J?"getTargetRanges"in new window.InputEvent("input"):!1,I=W&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=W&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=W&&/Android/.test(navigator.userAgent),he=W&&/^(?=.*Chrome).*/i.test(navigator.userAgent),se=W&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!he,Ce=I||q||se?" ":"​",Oe=w?" ":Ce,Be=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,ce=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,le={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},ve={directionless:1,unmergeable:2},Me={center:2,end:6,justify:4,left:1,right:3,start:5},Pe={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},We={normal:0,segmented:2,token:1},Xe={0:"normal",2:"segmented",1:"token"},st=!1,dt=0;function Ct(f){dt=f.timeStamp}function Se(f,s,d){return s.__lexicalLineBreak===f||f[`__lexicalKey_${d._key}`]!==void 0}function me(f){return f.getEditorState().read(()=>{let s=hn();return s!==null?s.clone():null})}function _e(f,s,d){st=!0;let x=100<performance.now()-dt;try{Lr(f,()=>{let A=hn()||me(f);var D=new Map,z=f.getRootElement(),ie=f._editorState,xe=f._blockCursorElement;let Re=!1,Ue="";for(var Ze=0;Ze<s.length;Ze++){var Ge=s[Ze],Ie=Ge.type,it=Ge.target,vt=Nr(it,ie);if(!(vt===null&&it!==z||on(vt))){if(Ie==="characterData"){if(Ge=x&&Nt(vt))e:{Ge=A,Ie=it;var $t=vt;if(Lt(Ge)){var Ut=Ge.anchor.getNode();if(Ut.is($t)&&Ge.format!==Ut.getFormat()){Ge=!1;break e}}Ge=Ie.nodeType===3&&$t.isAttached()}Ge&&($t=go(f._window),Ie=Ge=null,$t!==null&&$t.anchorNode===it&&(Ge=$t.anchorOffset,Ie=$t.focusOffset),it=it.nodeValue,it!==null&&je(vt,it,Ge,Ie,!1))}else if(Ie==="childList"){for(Re=!0,Ie=Ge.addedNodes,$t=0;$t<Ie.length;$t++){Ut=Ie[$t];var $n=fr(Ut),Xn=Ut.parentNode;Xn==null||Ut===xe||$n!==null||Ut.nodeName==="BR"&&Se(Ut,Xn,f)||(w&&($n=Ut.innerText||Ut.nodeValue)&&(Ue+=$n),Xn.removeChild(Ut))}if(Ge=Ge.removedNodes,Ie=Ge.length,0<Ie){for($t=0,Ut=0;Ut<Ie;Ut++)Xn=Ge[Ut],(Xn.nodeName==="BR"&&Se(Xn,it,f)||xe===Xn)&&(it.appendChild(Xn),$t++);Ie!==$t&&(it===z&&(vt=ie._nodeMap.get("root")),D.set(it,vt))}}}}if(0<D.size)for(let[cs,Rr]of D)if(nt(Rr))for(D=Rr.getChildrenKeys(),z=cs.firstChild,ie=0;ie<D.length;ie++)xe=f.getElementByKey(D[ie]),xe!==null&&(z==null?(cs.appendChild(xe),z=xe):z!==xe&&cs.replaceChild(xe,z),z=z.nextSibling);else Nt(Rr)&&Rr.markDirty();if(D=d.takeRecords(),0<D.length){for(z=0;z<D.length;z++)for(xe=D[z],ie=xe.addedNodes,xe=xe.target,Ze=0;Ze<ie.length;Ze++)vt=ie[Ze],it=vt.parentNode,it==null||vt.nodeName!=="BR"||Se(vt,xe,f)||it.removeChild(vt);d.takeRecords()}A!==null&&(Re&&(A.dirty=!0,Er(A)),w&&Kt(f)&&A.insertRawText(Ue))})}finally{st=!1}}function De(f){let s=f._observer;if(s!==null){let d=s.takeRecords();_e(f,d,s)}}function Fe(f){dt===0&&Cn(f).addEventListener("textInput",Ct,!0),f._observer=new MutationObserver((s,d)=>{_e(f,s,d)})}function ke(f,s){let d=f.__mode,x=f.__format;f=f.__style;let A=s.__mode,D=s.__format;return s=s.__style,(d===null||d===A)&&(x===null||x===D)&&(f===null||f===s)}function ze(f,s){let d=f.mergeWithSibling(s),x=bn()._normalizedNodes;return x.add(f.__key),x.add(s.__key),d}function tt(f){if(f.__text===""&&f.isSimpleText()&&!f.isUnmergeable())f.remove();else{for(var s;(s=f.getPreviousSibling())!==null&&Nt(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{ke(s,f)&&(f=ze(s,f));break}for(var d;(d=f.getNextSibling())!==null&&Nt(d)&&d.isSimpleText()&&!d.isUnmergeable();)if(d.__text==="")d.remove();else{ke(f,d)&&ze(f,d);break}}}function ut(f){return Et(f.anchor),Et(f.focus),f}function Et(f){for(;f.type==="element";){var s=f.getNode(),d=f.offset;if(d===s.getChildrenSize()?(s=s.getChildAtIndex(d-1),d=!0):(s=s.getChildAtIndex(d),d=!1),Nt(s)){f.set(s.__key,d?s.getTextContentSize():0,"text");break}else if(!nt(s))break;f.set(s.__key,d?s.getChildrenSize():0,"element")}}let Bt=1,Qe=typeof queueMicrotask=="function"?queueMicrotask:f=>{Promise.resolve().then(f)};function et(f){let s=document.activeElement;if(s===null)return!1;let d=s.nodeName;return on(Nr(f))&&(d==="INPUT"||d==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function lt(f,s,d){let x=f.getRootElement();try{return x!==null&&x.contains(s)&&x.contains(d)&&s!==null&&!et(s)&&wt(s)===f}catch{return!1}}function wt(f){for(;f!=null;){let s=f.__lexicalEditor;if(s!=null)return s;f=mn(f)}return null}function _t(f){return f.isToken()||f.isSegmented()}function Rt(f){for(;f!=null;){if(f.nodeType===3)return f;f=f.firstChild}return null}function qe(f,s,d){let x=le[s];return d!==null&&(f&x)===(d&x)||(f^=x,s==="subscript"?f&=~le.superscript:s==="superscript"&&(f&=~le.subscript)),f}function ot(f,s){if(s!=null)f.__key=s;else{nr(),99<ya&&B(14),s=bn();var d=eo(),x=""+Bt++;d._nodeMap.set(x,f),nt(f)?s._dirtyElements.set(x,!0):s._dirtyLeaves.add(x),s._cloneNotNeeded.add(x),s._dirtyType=1,f.__key=x}}function yt(f){var s=f.getParent();if(s!==null){let A=f.getWritable();s=s.getWritable();var d=f.getPreviousSibling();if(f=f.getNextSibling(),d===null)if(f!==null){var x=f.getWritable();s.__first=f.__key,x.__prev=null}else s.__first=null;else{if(x=d.getWritable(),f!==null){let D=f.getWritable();D.__prev=x.__key,x.__next=D.__key}else x.__next=null;A.__prev=null}f===null?d!==null?(f=d.getWritable(),s.__last=d.__key,f.__next=null):s.__last=null:(f=f.getWritable(),d!==null?(d=d.getWritable(),d.__next=f.__key,f.__prev=d.__key):f.__prev=null,A.__next=null),s.__size--,A.__parent=null}}function kt(f){99<ya&&B(14);var s=f.getLatest(),d=s.__parent,x=eo();let A=bn(),D=x._nodeMap;if(x=A._dirtyElements,d!==null)e:for(;d!==null;){if(x.has(d))break e;let z=D.get(d);if(z===void 0)break;x.set(d,!1),d=z.__parent}s=s.__key,A._dirtyType=1,nt(f)?x.set(s,!0):A._dirtyLeaves.add(s)}function Dt(f){nr();var s=bn();let d=s._compositionKey;f!==d&&(s._compositionKey=f,d!==null&&(s=sn(d),s!==null&&s.getWritable()),f!==null&&(f=sn(f),f!==null&&f.getWritable()))}function Vt(){return va()?null:bn()._compositionKey}function sn(f,s){return f=(s||eo())._nodeMap.get(f),f===void 0?null:f}function fr(f,s){let d=bn();return f=f[`__lexicalKey_${d._key}`],f!==void 0?sn(f,s):null}function Nr(f,s){for(;f!=null;){let d=fr(f,s);if(d!==null)return d;f=mn(f)}return null}function Qo(f){let s=Object.assign({},f._decorators);return f._pendingDecorators=s}function ia(f){return f.read(()=>Zn().getTextContent())}function Sr(f,s){Lr(f,()=>{var d=eo();if(!d.isEmpty())if(s==="root")Zn().markDirty();else{d=d._nodeMap;for(let[,x]of d)x.markDirty()}},f._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Zn(){return eo()._nodeMap.get("root")}function Er(f){nr();let s=eo();f!==null&&(f.dirty=!0,f.setCachedNodes(null)),s._selection=f}function po(f){var s=bn(),d;e:{for(d=f;d!=null;){let x=d[`__lexicalKey_${s._key}`];if(x!==void 0){d=x;break e}d=mn(d)}d=null}return d===null?(s=s.getRootElement(),f===s?sn("root"):null):sn(d)}function aa(f){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(f)}function Ee(f){let s=[];for(;f!==null;)s.push(f),f=f._parentEditor;return s}function ae(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function $e(f,s,d){if(s=go(s._window),s!==null){var x=s.anchorNode,{anchorOffset:A,focusOffset:D}=s;if(x!==null&&(s=x.nodeType===3?x.nodeValue:null,x=Nr(x),s!==null&&Nt(x))){if(s===Ce&&d){let z=d.length;s=d,D=A=z}s!==null&&je(x,s,A,D,f)}}}function je(f,s,d,x,A){let D=f;if(D.isAttached()&&(A||!D.isDirty())){let Re=D.isComposing(),Ue=s;if((Re||A)&&s[s.length-1]===Ce&&(Ue=s.slice(0,-1)),s=D.getTextContent(),A||Ue!==s)if(Ue==="")if(Dt(null),I||q||se)D.remove();else{let Ze=bn();setTimeout(()=>{Ze.update(()=>{D.isAttached()&&D.remove()})},20)}else{A=D.getParent(),s=ai();var z=D.getTextContentSize(),ie=Vt(),xe=D.getKey();D.isToken()||ie!==null&&xe===ie&&!Re||Lt(s)&&(A!==null&&!A.canInsertTextBefore()&&s.anchor.offset===0||s.anchor.key===f.__key&&s.anchor.offset===0&&!D.canInsertTextBefore()||s.focus.key===f.__key&&s.focus.offset===z&&!D.canInsertTextAfter())?D.markDirty():(f=hn(),Lt(f)&&d!==null&&x!==null&&(f.setTextNodeRange(D,d,D,x),D.isSegmented()&&(d=D.getTextContent(),d=jn(d),D.replace(d),D=d)),D.setTextContent(Ue))}}}function at(f,s){if(s.isSegmented())return!0;if(!f.isCollapsed())return!1;f=f.anchor.offset;let d=s.getParentOrThrow(),x=s.isToken();return f===0?((f=!s.canInsertTextBefore()||!d.canInsertTextBefore()||x)||(s=s.getPreviousSibling(),f=(Nt(s)||nt(s)&&s.isInline())&&!s.canInsertTextAfter()),f):f===s.getTextContentSize()?!s.canInsertTextAfter()||!d.canInsertTextAfter()||x:!1}function xt(f,s){f.__lexicalClassNameCache===void 0&&(f.__lexicalClassNameCache={});let d=f.__lexicalClassNameCache,x=d[s];return x!==void 0?x:(f=f[s],typeof f=="string"?(f=f.split(" "),d[s]=f):f)}function bt(f,s,d,x,A){d.size!==0&&(d=x.__type,x=x.__key,s=s.get(d),s===void 0&&B(33,d),d=s.klass,s=f.get(d),s===void 0&&(s=new Map,f.set(d,s)),f=s.get(x),d=f==="destroyed"&&A==="created",(f===void 0||d)&&s.set(x,d?"updated":A))}function ht(f,s,d){let x=f.getParent(),A=d;return x!==null&&(s&&d===0?(A=f.getIndexWithinParent(),f=x):s||d!==f.getChildrenSize()||(A=f.getIndexWithinParent()+1,f=x)),f.getChildAtIndex(s?A-1:A)}function At(f,s){var d=f.offset;return f.type==="element"?(f=f.getNode(),ht(f,s,d)):(f=f.getNode(),s&&d===0||!s&&d===f.getTextContentSize()?(d=s?f.getPreviousSibling():f.getNextSibling(),d===null?ht(f.getParentOrThrow(),s,f.getIndexWithinParent()+(s?0:1)):d):null)}function Kt(f){return f=(f=Cn(f).event)&&f.inputType,f==="insertFromPaste"||f==="insertFromPasteAsQuotation"}function Mt(f){return!Ar(f)&&!f.isLastChild()&&!f.isInline()}function Yt(f,s){return f=f._keyToDOMMap.get(s),f===void 0&&B(75,s),f}function mn(f){return f=f.assignedSlot||f.parentElement,f!==null&&f.nodeType===11?f.host:f}function Cr(f,s){for(f=f.getParent();f!==null;){if(f.is(s))return!0;f=f.getParent()}return!1}function Cn(f){return f=f._window,f===null&&B(78),f}function Jn(f){for(f=f.getParentOrThrow();f!==null&&!Ir(f);)f=f.getParentOrThrow();return f}function Ir(f){return Ar(f)||nt(f)&&f.isShadowRoot()}function sa(f){return f=f.constructor.clone(f),ot(f,null),f}function ei(f){var s=bn();let d=f.constructor.getType();return s=s._nodes.get(d),s===void 0&&B(97),s=s.replace,s!==null?(s=s(f),s instanceof f.constructor||B(98),s):f}function Cc(f,s){f=f.getParent(),!Ar(f)||nt(s)||on(s)||B(99)}function wc(f){return(on(f)||nt(f)&&!f.canBeEmpty())&&!f.isInline()}function Tc(f,s,d){d.style.removeProperty("caret-color"),s._blockCursorElement=null,s=f.parentElement,s!==null&&s.removeChild(f)}function go(f){return W?(f||window).getSelection():null}function Fs(f,s){for(;f!==Zn()&&f!=null;){if(s(f))return f;f=f.getParent()}return null}function Nc(f){let s=[],d=[f];for(;0<d.length;){let x=d.pop();x===void 0&&B(112),nt(x)&&d.unshift(...x.getChildren()),x!==f&&s.push(x)}return s}function ti(f){return f.nodeType===1}function Si(f){if(on(f)&&!f.isInline())return!0;if(!nt(f)||Ir(f))return!1;var s=f.getFirstChild();return s=s===null||Di(s)||Nt(s)||s.isInline(),!f.isInline()&&f.canBeEmpty()!==!1&&s}function Sc(f,s){for(;f!==null&&f.getParent()!==null&&!s(f);)f=f.getParentOrThrow();return s(f)?f:null}function js(f,s,d,x,A,D){for(f=f.getFirstChild();f!==null;){let z=f.__key;f.__parent===s&&(nt(f)&&js(f,z,d,x,A,D),d.has(z)||D.delete(z),A.push(z)),f=f.getNextSibling()}}function hh(f,s,d,x){f=f._nodeMap,s=s._nodeMap;let A=[];for(let[D]of x){let z=s.get(D);z===void 0||z.isAttached()||(nt(z)&&js(z,D,f,s,A,x),f.has(D)||x.delete(D),A.push(D))}for(let D of A)s.delete(D);for(let D of d)x=s.get(D),x===void 0||x.isAttached()||(f.has(D)||d.delete(D),s.delete(D))}let Rn="",er="",No="",So,hr,Jr,Ga=!1,Oc=!1,Pn,Xr=null,Fn,Bs,Qr,Oo,Ws,Va;function pr(f,s){let d=Qr.get(f);if(s!==null){let x=kc(f);x.parentNode===s&&s.removeChild(x)}Oo.has(f)||hr._keyToDOMMap.delete(f),nt(d)&&(f=Ua(d,Qr),zs(f,0,f.length-1,null)),d!==void 0&&bt(Va,Jr,Pn,d,"destroyed")}function zs(f,s,d,x){for(;s<=d;++s){let A=f[s];A!==void 0&&pr(A,x)}}function gr(f,s){f.setProperty("text-align",s)}function od(f,s){var d=So.theme.indent;if(typeof d=="string"){let x=f.classList.contains(d);0<s&&!x?f.classList.add(d):1>s&&x&&f.classList.remove(d)}d=getComputedStyle(f).getPropertyValue("--lexical-indent-base-value")||"40px",f.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${d})`)}function Oi(f,s){f=f.style,s===0?gr(f,""):s===1?gr(f,"left"):s===2?gr(f,"center"):s===3?gr(f,"right"):s===4?gr(f,"justify"):s===5?gr(f,"start"):s===6&&gr(f,"end")}function Ka(f,s,d){let x=Oo.get(f);x===void 0&&B(60);let A=x.createDOM(So,hr);var D=hr._keyToDOMMap;if(A["__lexicalKey_"+hr._key]=f,D.set(f,A),Nt(x)?A.setAttribute("data-lexical-text","true"):on(x)&&A.setAttribute("data-lexical-decorator","true"),nt(x)){if(f=x.__indent,D=x.__size,f!==0&&od(A,f),D!==0){--D,f=Ua(x,Oo);var z=er;er="",Ac(f,x,0,D,A,null),$c(x,A),er=z}f=x.__format,f!==0&&Oi(A,f),x.isInline()||Hs(null,x,A),Mt(x)&&(Rn+=`
242
-
243
- `,No+=`
244
-
245
- `)}else D=x.getTextContent(),on(x)?(z=x.decorate(hr,So),z!==null&&Gs(f,z),A.contentEditable="false"):Nt(x)&&(x.isDirectionless()||(er+=D)),Rn+=D,No+=D;return s!==null&&(d!=null?s.insertBefore(A,d):(d=s.__lexicalLineBreak,d!=null?s.insertBefore(A,d):s.appendChild(A))),bt(Va,Jr,Pn,x,"created"),A}function Ac(f,s,d,x,A,D){let z=Rn;for(Rn="";d<=x;++d)Ka(f[d],A,D);Mt(s)&&(Rn+=`
246
-
247
- `),A.__lexicalTextContent=Rn,Rn=z+Rn}function Rc(f,s){return f=s.get(f),Di(f)||on(f)&&f.isInline()}function Hs(f,s,d){f=f!==null&&(f.__size===0||Rc(f.__last,Qr)),s=s.__size===0||Rc(s.__last,Oo),f?s||(s=d.__lexicalLineBreak,s!=null&&d.removeChild(s),d.__lexicalLineBreak=null):s&&(s=document.createElement("br"),d.__lexicalLineBreak=s,d.appendChild(s))}function $c(f,s){var d=s.__lexicalDir;if(s.__lexicalDirTextContent!==er||d!==Xr){let D=er==="";if(D)var x=Xr;else x=er,x=Be.test(x)?"rtl":ce.test(x)?"ltr":null;if(x!==d){let z=s.classList,ie=So.theme;var A=d!==null?ie[d]:void 0;let xe=x!==null?ie[x]:void 0;A!==void 0&&(typeof A=="string"&&(A=A.split(" "),A=ie[d]=A),z.remove(...A)),x===null||D&&x==="ltr"?s.removeAttribute("dir"):(xe!==void 0&&(typeof xe=="string"&&(d=xe.split(" "),xe=ie[x]=d),xe!==void 0&&z.add(...xe)),s.dir=x),Oc||(f.getWritable().__dir=x)}Xr=x,s.__lexicalDirTextContent=er,s.__lexicalDir=x}}function Ua(f,s){let d=[];for(f=f.__first;f!==null;){let x=s.get(f);x===void 0&&B(101),d.push(f),f=x.__next}return d}function Ai(f,s){var d=Qr.get(f),x=Oo.get(f);d!==void 0&&x!==void 0||B(61);var A=Ga||Bs.has(f)||Fn.has(f);let D=Yt(hr,f);if(d===x&&!A)return nt(d)?(x=D.__lexicalTextContent,x!==void 0&&(Rn+=x,No+=x),x=D.__lexicalDirTextContent,x!==void 0&&(er+=x)):(x=d.getTextContent(),Nt(d)&&!d.isDirectionless()&&(er+=x),No+=x,Rn+=x),D;if(d!==x&&A&&bt(Va,Jr,Pn,x,"updated"),x.updateDOM(d,D,So))return x=Ka(f,null,null),s===null&&B(62),s.replaceChild(x,D),pr(f,null),x;if(nt(d)&&nt(x)){if(f=x.__indent,f!==d.__indent&&od(D,f),f=x.__format,f!==d.__format&&Oi(D,f),A){f=x,A=er,er="",s=Rn;var z=d.__size,ie=f.__size;if(Rn="",z===1&&ie===1){var xe=d.__first,Re=f.__first;if(xe===Re)Ai(xe,D);else{var Ue=kc(xe);Re=Ka(Re,null,null),D.replaceChild(Re,Ue),pr(xe,null)}}else{Re=Ua(d,Qr);var Ze=Ua(f,Oo);if(z===0)ie!==0&&Ac(Ze,f,0,ie-1,D,null);else if(ie===0)z!==0&&(xe=D.__lexicalLineBreak==null,zs(Re,0,z-1,xe?null:D),xe&&(D.textContent=""));else{var Ge=Re;Re=Ze,Ze=z-1,z=ie-1;let it=D.firstChild,vt=0;for(ie=0;vt<=Ze&&ie<=z;){var Ie=Ge[vt];let $t=Re[ie];if(Ie===$t)it=Dc(Ai($t,D)),vt++,ie++;else{xe===void 0&&(xe=new Set(Ge)),Ue===void 0&&(Ue=new Set(Re));let Ut=Ue.has(Ie),$n=xe.has($t);Ut?($n?(Ie=Yt(hr,$t),Ie===it?it=Dc(Ai($t,D)):(it!=null?D.insertBefore(Ie,it):D.appendChild(Ie),Ai($t,D)),vt++):Ka($t,D,it),ie++):(it=Dc(kc(Ie)),pr(Ie,D),vt++)}}xe=vt>Ze,Ue=ie>z,xe&&!Ue?(xe=Re[z+1],xe=xe===void 0?null:hr.getElementByKey(xe),Ac(Re,f,ie,z,D,xe)):Ue&&!xe&&zs(Ge,vt,Ze,D)}}Mt(f)&&(Rn+=`
248
-
249
- `),D.__lexicalTextContent=Rn,Rn=s+Rn,$c(f,D),er=A,Ar(x)||x.isInline()||Hs(d,x,D)}Mt(x)&&(Rn+=`
250
-
251
- `,No+=`
252
-
253
- `)}else d=x.getTextContent(),on(x)?(A=x.decorate(hr,So),A!==null&&Gs(f,A)):Nt(x)&&!x.isDirectionless()&&(er+=d),Rn+=d,No+=d;return!Oc&&Ar(x)&&x.__cachedText!==No&&(x=x.getWritable(),x.__cachedText=No),D}function Gs(f,s){let d=hr._pendingDecorators,x=hr._decorators;if(d===null){if(x[f]===s)return;d=Qo(hr)}d[f]=s}function Dc(f){return f=f.nextSibling,f!==null&&f===hr._blockCursorElement&&(f=f.nextSibling),f}function kc(f){let s=Ws.get(f);return s===void 0&&B(75,f),s}let Ao=Object.freeze({}),Mc=[["keydown",_h],["pointerdown",gh],["compositionstart",vh],["compositionend",bh],["input",yh],["click",ph],["cut",Ao],["copy",Ao],["dragstart",Ao],["dragover",Ao],["dragend",Ao],["paste",Ao],["focus",Ao],["blur",Ao],["drop",Ao]];N&&Mc.push(["beforeinput",(f,s)=>mh(f,s)]);let Ya=0,id=0,ad=0,la=null,qa=0,Pc=!1,Ic=!1,Za=!1,Ja=!1,sd=[0,"",0,"root",0];function ld(f,s,d,x,A){let D=f.anchor,z=f.focus,ie=D.getNode();var xe=bn();let Re=go(xe._window),Ue=Re!==null?Re.anchorNode:null,Ze=D.key;xe=xe.getElementByKey(Ze);let Ge=d.length;return Ze!==z.key||!Nt(ie)||(!A&&(!N||ad<x+50)||ie.isDirty()&&2>Ge||aa(d))&&D.offset!==z.offset&&!ie.isComposing()||_t(ie)||ie.isDirty()&&1<Ge||(A||!N)&&xe!==null&&!ie.isComposing()&&Ue!==Rt(xe)||Re!==null&&s!==null&&(!s.collapsed||s.startContainer!==Re.anchorNode||s.startOffset!==Re.anchorOffset)||ie.getFormat()!==f.format||ie.getStyle()!==f.style||at(f,ie)}function cd(f,s){return f!==null&&f.nodeValue!==null&&f.nodeType===3&&s!==0&&s!==f.nodeValue.length}function ud(f,s,d){let{anchorNode:x,anchorOffset:A,focusNode:D,focusOffset:z}=f;Pc&&(Pc=!1,cd(x,A)&&cd(D,z))||Lr(s,()=>{if(!d)Er(null);else if(lt(s,x,D)){var ie=hn();if(Lt(ie)){var xe=ie.anchor,Re=xe.getNode();if(ie.isCollapsed()){f.type==="Range"&&f.anchorNode===f.focusNode&&(ie.dirty=!0);var Ue=Cn(s).event;Ue=Ue?Ue.timeStamp:performance.now();let[Ge,Ie,it,vt,$t]=sd;var Ze=Zn();Ze=s.isComposing()===!1&&Ze.getTextContent()==="",Ue<$t+200&&xe.offset===it&&xe.key===vt?(ie.format=Ge,ie.style=Ie):xe.type==="text"?(ie.format=Re.getFormat(),ie.style=Re.getStyle()):xe.type!=="element"||Ze||(ie.format=0,ie.style="")}else{xe=255,Re=!1,Ue=ie.getNodes(),Ze=Ue.length;for(let Ge=0;Ge<Ze;Ge++){let Ie=Ue[Ge];if(Nt(Ie)&&(Re=!0,xe&=Ie.getFormat(),xe===0))break}ie.format=Re?xe:0}}pt(s,e,void 0)}})}function ph(f,s){Lr(s,()=>{let d=hn();var x=go(s._window);let A=ai();if(x)if(Lt(d)){let z=d.anchor;var D=z.getNode();z.type==="element"&&z.offset===0&&d.isCollapsed()&&!Ar(D)&&Zn().getChildrenSize()===1&&D.getTopLevelElementOrThrow().isEmpty()&&A!==null&&d.is(A)?(x.removeAllRanges(),d.dirty=!0):f.detail!==3||d.isCollapsed()||(x=d.focus.getNode(),D!==x&&(nt(D)?D.select(0):D.getParentOrThrow().select(0)))}else f.pointerType==="touch"&&(D=x.anchorNode,D!==null&&(D=D.nodeType,D===1||D===3))&&(x=Ii(A,x,s),Er(x));pt(s,t,f)})}function gh(f,s){let d=f.target;f=f.pointerType,d instanceof Node&&f!=="touch"&&Lr(s,()=>{on(Nr(d))||(Ic=!0)})}function Lc(f){return f.getTargetRanges?(f=f.getTargetRanges(),f.length===0?null:f[0]):null}function dd(f,s){return f!==s||nt(f)||nt(s)||!f.isToken()||!s.isToken()}function mh(f,s){let d=f.inputType,x=Lc(f);d==="deleteCompositionText"||w&&Kt(s)||d!=="insertCompositionText"&&Lr(s,()=>{let A=hn();if(d==="deleteContentBackward"){if(A===null){var D=ai();if(!Lt(D))return;Er(D.clone())}if(Lt(A)){ue&&Dt(A.anchor.key),id===229&&f.timeStamp<Ya+30&&s.isComposing()&&A.anchor.key===A.focus.key?(Dt(null),Ya=0,setTimeout(()=>{Lr(s,()=>{Dt(null)})},30),Lt(A)&&(D=A.anchor.getNode(),D.markDirty(),A.format=D.getFormat(),A.style=D.getStyle()),1>=A.anchor.getNode().getTextContent().length&&(f.preventDefault(),pt(s,n,!0))):(f.preventDefault(),pt(s,n,!0));return}}if(Lt(A)){D=f.data,la!==null&&$e(!1,s,la),A.dirty&&la===null||!A.isCollapsed()||Ar(A.anchor.getNode())||x===null||A.applyDOMRange(x),la=null;var z=A.focus,ie=A.anchor.getNode();if(z=z.getNode(),d==="insertText"||d==="insertTranspose")D===`
254
- `?(f.preventDefault(),pt(s,r,!1)):D===`
255
-
256
- `?(f.preventDefault(),pt(s,o,void 0)):D==null&&f.dataTransfer?(D=f.dataTransfer.getData("text/plain"),f.preventDefault(),A.insertRawText(D)):D!=null&&ld(A,x,D,f.timeStamp,!0)?(f.preventDefault(),pt(s,i,D)):la=D,ad=f.timeStamp;else switch(f.preventDefault(),d){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pt(s,i,f);break;case"insertFromComposition":Dt(null),pt(s,i,f);break;case"insertLineBreak":Dt(null),pt(s,r,!1);break;case"insertParagraph":Dt(null),Za&&!q?(Za=!1,pt(s,r,!1)):pt(s,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pt(s,a,f);break;case"deleteByComposition":dd(ie,z)&&pt(s,l,f);break;case"deleteByDrag":case"deleteByCut":pt(s,l,f);break;case"deleteContent":pt(s,n,!1);break;case"deleteWordBackward":pt(s,u,!0);break;case"deleteWordForward":pt(s,u,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pt(s,p,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pt(s,p,!1);break;case"formatStrikeThrough":pt(s,m,"strikethrough");break;case"formatBold":pt(s,m,"bold");break;case"formatItalic":pt(s,m,"italic");break;case"formatUnderline":pt(s,m,"underline");break;case"historyUndo":pt(s,b,void 0);break;case"historyRedo":pt(s,C,void 0)}}})}function yh(f,s){f.stopPropagation(),Lr(s,()=>{var d=hn(),x=f.data,A=Lc(f);if(x!=null&&Lt(d)&&ld(d,A,x,f.timeStamp,!1)){Ja&&(Fc(s,x),Ja=!1);var D=d.anchor,z=D.getNode();if(A=go(s._window),A===null)return;let ie=D.offset;(D=N&&!d.isCollapsed()&&Nt(z)&&A.anchorNode!==null)&&(z=z.getTextContent().slice(0,ie)+x+z.getTextContent().slice(ie+d.focus.offset),A=A.anchorNode,D=z===(A.nodeType===3?A.nodeValue:null)),D||pt(s,i,x),x=x.length,w&&1<x&&f.inputType==="insertCompositionText"&&!s.isComposing()&&(d.anchor.offset-=x),I||q||se||!s.isComposing()||(Ya=0,Dt(null))}else $e(!1,s,x!==null?x:void 0),Ja&&(Fc(s,x||void 0),Ja=!1);nr(),d=bn(),De(d)}),la=null}function vh(f,s){Lr(s,()=>{let d=hn();if(Lt(d)&&!s.isComposing()){let x=d.anchor,A=d.anchor.getNode();Dt(x.key),(f.timeStamp<Ya+30||x.type==="element"||!d.isCollapsed()||A.getFormat()!==d.format||A.getStyle()!==d.style)&&pt(s,i,Oe)}})}function Fc(f,s){var d=f._compositionKey;if(Dt(null),d!==null&&s!=null){if(s===""){s=sn(d),f=Rt(f.getElementByKey(d)),f!==null&&f.nodeValue!==null&&Nt(s)&&je(s,f.nodeValue,null,null,!0);return}if(s[s.length-1]===`
257
- `&&(d=hn(),Lt(d))){s=d.focus,d.anchor.set(s.key,s.offset,s.type),pt(f,P,null);return}}$e(!0,f,s)}function bh(f,s){w?Ja=!0:Lr(s,()=>{Fc(s,f.data)})}function _h(f,s){if(Ya=f.timeStamp,id=f.keyCode,!s.isComposing()){var{keyCode:d,shiftKey:x,ctrlKey:A,metaKey:D,altKey:z}=f;if(!pt(s,_,f)){if(d!==39||A||D||z)if(d!==39||z||x||!A&&!D)if(d!==37||A||D||z)if(d!==37||z||x||!A&&!D)if(d!==38||A||D)if(d!==40||A||D)if(d===13&&x)Za=!0,pt(s,P,f);else if(d===32)pt(s,M,f);else if(F&&A&&d===79)f.preventDefault(),Za=!0,pt(s,r,!0);else if(d!==13||x){var ie=F?z||D?!1:d===8||d===72&&A:A||z||D?!1:d===8;ie?d===8?pt(s,Y,f):(f.preventDefault(),pt(s,n,!0)):d===27?pt(s,X,f):(ie=F?x||z||D?!1:d===46||d===68&&A:A||z||D?!1:d===46,ie?d===46?pt(s,oe,f):(f.preventDefault(),pt(s,n,!1)):d===8&&(F?z:A)?(f.preventDefault(),pt(s,u,!0)):d===46&&(F?z:A)?(f.preventDefault(),pt(s,u,!1)):F&&D&&d===8?(f.preventDefault(),pt(s,p,!0)):F&&D&&d===46?(f.preventDefault(),pt(s,p,!1)):d===66&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"bold")):d===85&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"underline")):d===73&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"italic")):d!==9||z||A||D?d===90&&!x&&(F?D:A)?(f.preventDefault(),pt(s,b,void 0)):(ie=F?d===90&&D&&x:d===89&&A||d===90&&A&&x,ie?(f.preventDefault(),pt(s,C,void 0)):ii(s._editorState._selection)?(ie=x?!1:d===67?F?D:A:!1,ie?(f.preventDefault(),pt(s,ne,f)):(ie=x?!1:d===88?F?D:A:!1,ie?(f.preventDefault(),pt(s,fe,f)):d===65&&(F?D:A)&&(f.preventDefault(),pt(s,U,f)))):!w&&d===65&&(F?D:A)&&(f.preventDefault(),pt(s,U,f))):pt(s,Z,f))}else Za=!1,pt(s,P,f);else pt(s,k,f);else pt(s,R,f);else pt(s,O,f);else pt(s,T,f);else pt(s,v,f);else pt(s,y,f);(A||x||z||D)&&pt(s,re,f)}}}function fd(f){let s=f.__lexicalEventHandles;return s===void 0&&(s=[],f.__lexicalEventHandles=s),s}let ca=new Map;function hd(f){f=f.target;let s=go(f==null?null:f.nodeType===9?f.defaultView:f.ownerDocument.defaultView);if(s!==null){var d=wt(s.anchorNode);if(d!==null){Ic&&(Ic=!1,Lr(d,()=>{var z=ai(),ie=s.anchorNode;ie!==null&&(ie=ie.nodeType,ie===1||ie===3)&&(z=Ii(z,s,d),Er(z))})),f=Ee(d),f=f[f.length-1];var x=f._key,A=ca.get(x),D=A||f;D!==d&&ud(s,D,!1),ud(s,d,!0),d!==f?ca.set(x,d):A&&ca.delete(x)}}}function xh(f,s){qa===0&&f.ownerDocument.addEventListener("selectionchange",hd),qa++,f.__lexicalEditor=s;let d=fd(f);for(let x=0;x<Mc.length;x++){let[A,D]=Mc[x],z=typeof D=="function"?ie=>{ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()&&D(ie,s))}:ie=>{if(ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()))switch(A){case"cut":return pt(s,fe,ie);case"copy":return pt(s,ne,ie);case"paste":return pt(s,a,ie);case"dragstart":return pt(s,Q,ie);case"dragover":return pt(s,de,ie);case"dragend":return pt(s,pe,ie);case"focus":return pt(s,j,ie);case"blur":return pt(s,ee,ie);case"drop":return pt(s,K,ie)}};f.addEventListener(A,z),d.push(()=>{f.removeEventListener(A,z)})}}function Ri(f,s,d){nr();var x=f.__key;let A=f.getParent();if(A!==null){var D=hn();if(Lt(D)&&nt(f)){var{anchor:z,focus:ie}=D,xe=z.getNode(),Re=ie.getNode();Cr(xe,f)&&z.set(f.__key,0,"element"),Cr(Re,f)&&ie.set(f.__key,0,"element")}if(xe=D,Re=!1,Lt(xe)&&s){D=xe.anchor;let Ue=xe.focus;D.key===x&&(ma(D,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0),Ue.key===x&&(ma(Ue,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0)}else ii(xe)&&s&&f.isSelected()&&f.selectPrevious();Lt(xe)&&s&&!Re?(x=f.getIndexWithinParent(),yt(f),Li(xe,A,x,-1)):yt(f),d||Ir(A)||A.canBeEmpty()||!A.isEmpty()||Ri(A,s),s&&Ar(A)&&A.isEmpty()&&A.selectEnd()}}class ua{static getType(){B(64,this.name)}static clone(){B(65,this.name)}constructor(s){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,ot(this,s)}getType(){return this.__type}isAttached(){for(var s=this.__key;s!==null;){if(s==="root")return!0;if(s=sn(s),s===null)break;s=s.__parent}return!1}isSelected(s){if(s=s||hn(),s==null)return!1;let d=s.getNodes().some(x=>x.__key===this.__key);return Nt(this)?d:Lt(s)&&s.anchor.type==="element"&&s.focus.type==="element"&&s.anchor.key===s.focus.key&&s.anchor.offset===s.focus.offset?!1:d}getKey(){return this.__key}getIndexWithinParent(){var s=this.getParent();if(s===null)return-1;s=s.getFirstChild();let d=0;for(;s!==null;){if(this.is(s))return d;d++,s=s.getNextSibling()}return-1}getParent(){let s=this.getLatest().__parent;return s===null?null:sn(s)}getParentOrThrow(){let s=this.getParent();return s===null&&B(66,this.__key),s}getTopLevelElement(){let s=this;for(;s!==null;){let d=s.getParent();if(Ir(d))return s;s=d}return null}getTopLevelElementOrThrow(){let s=this.getTopLevelElement();return s===null&&B(67,this.__key),s}getParents(){let s=[],d=this.getParent();for(;d!==null;)s.push(d),d=d.getParent();return s}getParentKeys(){let s=[],d=this.getParent();for(;d!==null;)s.push(d.__key),d=d.getParent();return s}getPreviousSibling(){let s=this.getLatest().__prev;return s===null?null:sn(s)}getPreviousSiblings(){let s=[];var d=this.getParent();if(d===null)return s;for(d=d.getFirstChild();d!==null&&!d.is(this);)s.push(d),d=d.getNextSibling();return s}getNextSibling(){let s=this.getLatest().__next;return s===null?null:sn(s)}getNextSiblings(){let s=[],d=this.getNextSibling();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getCommonAncestor(s){let d=this.getParents();var x=s.getParents();nt(this)&&d.unshift(this),nt(s)&&x.unshift(s),s=d.length;var A=x.length;if(s===0||A===0||d[s-1]!==x[A-1])return null;for(x=new Set(x),A=0;A<s;A++){let D=d[A];if(x.has(D))return D}return null}is(s){return s==null?!1:this.__key===s.__key}isBefore(s){if(this===s)return!1;if(s.isParentOf(this))return!0;if(this.isParentOf(s))return!1;var d=this.getCommonAncestor(s);let x=this;for(;;){var A=x.getParentOrThrow();if(A===d){A=x.getIndexWithinParent();break}x=A}for(x=s;;){if(s=x.getParentOrThrow(),s===d){d=x.getIndexWithinParent();break}x=s}return A<d}isParentOf(s){let d=this.__key;if(d===s.__key)return!1;for(;s!==null;){if(s.__key===d)return!0;s=s.getParent()}return!1}getNodesBetween(s){let d=this.isBefore(s),x=[],A=new Set;for(var D=this;;){var z=D.__key;if(A.has(z)||(A.add(z),x.push(D)),D===s)break;if(z=nt(D)?d?D.getFirstChild():D.getLastChild():null,z!==null)D=z;else if(z=d?D.getNextSibling():D.getPreviousSibling(),z!==null)D=z;else{if(D=D.getParentOrThrow(),A.has(D.__key)||x.push(D),D===s)break;z=D;do z===null&&B(68),D=d?z.getNextSibling():z.getPreviousSibling(),z=z.getParent(),z!==null&&(D!==null||A.has(z.__key)||x.push(z));while(D===null)}}return d||x.reverse(),x}isDirty(){let s=bn()._dirtyLeaves;return s!==null&&s.has(this.__key)}getLatest(){let s=sn(this.__key);return s===null&&B(113),s}getWritable(){nr();var s=eo(),d=bn();s=s._nodeMap;let x=this.__key,A=this.getLatest(),D=A.__parent;d=d._cloneNotNeeded;var z=hn();return Wr(z)&&z.setCachedNodes(null),d.has(x)?(kt(A),A):(z=A.constructor.clone(A),z.__parent=D,z.__next=A.__next,z.__prev=A.__prev,nt(A)&&nt(z)?(z.__first=A.__first,z.__last=A.__last,z.__size=A.__size,z.__indent=A.__indent,z.__format=A.__format,z.__dir=A.__dir):Nt(A)&&Nt(z)&&(z.__format=A.__format,z.__style=A.__style,z.__mode=A.__mode,z.__detail=A.__detail),d.add(x),z.__key=x,kt(z),s.set(x,z),z)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){B(70)}updateDOM(){B(71)}exportDOM(s){return{element:this.createDOM(s._config,s)}}exportJSON(){B(72)}static importJSON(){B(18,this.name)}static transform(){return null}remove(s){Ri(this,!0,s)}replace(s,d){nr();var x=hn();x!==null&&(x=x.clone()),Cc(this,s);let A=this.getLatest(),D=this.__key,z=s.__key,ie=s.getWritable();s=this.getParentOrThrow().getWritable();let xe=s.__size;yt(ie);let Re=A.getPreviousSibling(),Ue=A.getNextSibling(),Ze=A.__prev,Ge=A.__next,Ie=A.__parent;return Ri(A,!1,!0),Re===null?s.__first=z:Re.getWritable().__next=z,ie.__prev=Ze,Ue===null?s.__last=z:Ue.getWritable().__prev=z,ie.__next=Ge,ie.__parent=Ie,s.__size=xe,d&&this.getChildren().forEach(it=>{ie.append(it)}),Lt(x)&&(Er(x),d=x.anchor,x=x.focus,d.key===D&&ha(d,ie),x.key===D&&ha(x,ie)),Vt()===D&&Dt(z),ie}insertAfter(s,d=!0){nr(),Cc(this,s);var x=this.getWritable();let A=s.getWritable();var D=A.getParent();let z=hn();var ie=!1,xe=!1;if(D!==null){var Re=s.getIndexWithinParent();yt(A),Lt(z)&&(xe=D.__key,ie=z.anchor,D=z.focus,ie=ie.type==="element"&&ie.key===xe&&ie.offset===Re+1,xe=D.type==="element"&&D.key===xe&&D.offset===Re+1)}D=this.getNextSibling(),Re=this.getParentOrThrow().getWritable();let Ue=A.__key,Ze=x.__next;return D===null?Re.__last=Ue:D.getWritable().__prev=Ue,Re.__size++,x.__next=Ue,A.__next=Ze,A.__prev=x.__key,A.__parent=x.__parent,d&&Lt(z)&&(d=this.getIndexWithinParent(),Li(z,Re,d+1),x=Re.__key,ie&&z.anchor.set(x,d+2,"element"),xe&&z.focus.set(x,d+2,"element")),s}insertBefore(s,d=!0){nr(),Cc(this,s);var x=this.getWritable();let A=s.getWritable(),D=A.__key;yt(A);let z=this.getPreviousSibling(),ie=this.getParentOrThrow().getWritable(),xe=x.__prev,Re=this.getIndexWithinParent();return z===null?ie.__first=D:z.getWritable().__next=D,ie.__size++,x.__prev=D,A.__prev=xe,A.__next=x.__key,A.__parent=x.__parent,x=hn(),d&&Lt(x)&&(d=this.getParentOrThrow(),Li(x,d,Re)),s}isParentRequired(){return!1}createParentElementNode(){return bo()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(s,d){nr();let x=this.getPreviousSibling(),A=this.getParentOrThrow();return x===null?A.select(0,0):nt(x)?x.select():Nt(x)?x.select(s,d):(s=x.getIndexWithinParent()+1,A.select(s,s))}selectNext(s,d){nr();let x=this.getNextSibling(),A=this.getParentOrThrow();return x===null?A.select():nt(x)?x.select(0,0):Nt(x)?x.select(s,d):(s=x.getIndexWithinParent(),A.select(s,s))}markDirty(){this.getWritable()}}function Xa(f,s,d){d=d||s.getParentOrThrow().getLastChild();let x=s;for(s=[s];x!==d;){if(!x.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");x=x.getNextSibling(),s.push(x)}for(let A of s)f=f.insertAfter(A)}class da extends ua{static getType(){return"linebreak"}static clone(s){return new da(s.__key)}constructor(s){super(s)}getTextContent(){return`
258
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:s=>{let d=s.parentElement,x,A;return d!==null&&((x=d.firstChild)===s||x.nextSibling===s&&x.nodeType===3&&(x.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((A=d.lastChild)===s||A.previousSibling===s&&A.nodeType===3&&(A.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:Qa,priority:0}}}}static importJSON(){return $i()}exportJSON(){return{type:"linebreak",version:1}}}function Qa(){return{node:$i()}}function $i(){return ei(new da)}function Di(f){return f instanceof da}function ki(f,s){return s&16?"code":s&128?"mark":s&32?"sub":s&64?"sup":null}function es(f,s){return s&1?"strong":s&2?"em":"span"}function jc(f,s,d,x,A){f=x.classList,x=xt(A,"base"),x!==void 0&&f.add(...x),x=xt(A,"underlineStrikethrough");let D=!1,z=s&8&&s&4;var ie=d&8&&d&4;x!==void 0&&(ie?(D=!0,z||f.add(...x)):z&&f.remove(...x));for(let xe in le)ie=le[xe],x=xt(A,xe),x!==void 0&&(d&ie?!D||xe!=="underline"&&xe!=="strikethrough"?(!(s&ie)||z&&xe==="underline"||xe==="strikethrough")&&f.add(...x):s&ie&&f.remove(...x):s&ie&&f.remove(...x))}function Vs(f,s,d){let x=s.firstChild;if(d=d.isComposing(),f+=d?Ce:"",x==null)s.textContent=f;else if(s=x.nodeValue,s!==f)if(d||w){d=s.length;let A=f.length,D=0,z=0;for(;D<d&&D<A&&s[D]===f[D];)D++;for(;z+D<d&&z+D<A&&s[d-z-1]===f[A-z-1];)z++;f=[D,d-D-z,f.slice(D,A-z)];let[ie,xe,Re]=f;xe!==0&&x.deleteData(ie,xe),x.insertData(ie,Re)}else x.nodeValue=f}function fa(f,s){return s=document.createElement(s),s.appendChild(f),s}class ni extends ua{static getType(){return"text"}static clone(s){return new ni(s.__text,s.__key)}constructor(s,d){super(d),this.__text=s,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let s=this.getLatest();return Xe[s.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Vt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(s){return s=le[s],(this.getFormat()&s)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(s,d){let x=this.getLatest().__format;return qe(x,s,d)}createDOM(s){var d=this.__format,x=ki(this,d);let A=es(this,d),D=document.createElement(x===null?A:x),z=D;return this.hasFormat("code")&&D.setAttribute("spellcheck","false"),x!==null&&(z=document.createElement(A),D.appendChild(z)),x=z,Vs(this.__text,x,this),s=s.theme.text,s!==void 0&&jc(A,0,d,x,s),d=this.__style,d!==""&&(D.style.cssText=d),D}updateDOM(s,d,x){let A=this.__text;var D=s.__format,z=this.__format,ie=ki(this,D);let xe=ki(this,z);var Re=es(this,D);let Ue=es(this,z);return(ie===null?Re:ie)!==(xe===null?Ue:xe)?!0:ie===xe&&Re!==Ue?(D=d.firstChild,D==null&&B(48),s=ie=document.createElement(Ue),Vs(A,s,this),x=x.theme.text,x!==void 0&&jc(Ue,0,z,s,x),d.replaceChild(ie,D),!1):(Re=d,xe!==null&&ie!==null&&(Re=d.firstChild,Re==null&&B(49)),Vs(A,Re,this),x=x.theme.text,x!==void 0&&D!==z&&jc(Ue,D,z,Re,x),z=this.__style,s.__style!==z&&(d.style.cssText=z),!1)}static importDOM(){return{"#text":()=>({conversion:Us,priority:0}),b:()=>({conversion:Ks,priority:0}),code:()=>({conversion:ri,priority:0}),em:()=>({conversion:ri,priority:0}),i:()=>({conversion:ri,priority:0}),s:()=>({conversion:ri,priority:0}),span:()=>({conversion:mt,priority:0}),strong:()=>({conversion:ri,priority:0}),sub:()=>({conversion:ri,priority:0}),sup:()=>({conversion:ri,priority:0}),u:()=>({conversion:ri,priority:0})}}static importJSON(s){let d=jn(s.text);return d.setFormat(s.format),d.setDetail(s.detail),d.setMode(s.mode),d.setStyle(s.style),d}exportDOM(s){return{element:s}=super.exportDOM(s),s!==null&&ti(s)||B(132),s.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(s=fa(s,"b")),this.hasFormat("italic")&&(s=fa(s,"i")),this.hasFormat("strikethrough")&&(s=fa(s,"s")),this.hasFormat("underline")&&(s=fa(s,"u")),{element:s}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(s){let d=this.getWritable();return d.__format=typeof s=="string"?le[s]:s,d}setDetail(s){let d=this.getWritable();return d.__detail=typeof s=="string"?ve[s]:s,d}setStyle(s){let d=this.getWritable();return d.__style=s,d}toggleFormat(s){let d=this.getFormat();return s=qe(d,s,null),this.setFormat(s)}toggleDirectionless(){let s=this.getWritable();return s.__detail^=1,s}toggleUnmergeable(){let s=this.getWritable();return s.__detail^=2,s}setMode(s){if(s=We[s],this.__mode===s)return this;let d=this.getWritable();return d.__mode=s,d}setTextContent(s){if(this.__text===s)return this;let d=this.getWritable();return d.__text=s,d}select(s,d){nr();let x=hn();var A=this.getTextContent();let D=this.__key;if(typeof A=="string"?(A=A.length,s===void 0&&(s=A),d===void 0&&(d=A)):d=s=0,Lt(x))A=Vt(),A!==x.anchor.key&&A!==x.focus.key||Dt(D),x.setTextNodeRange(this,s,this,d);else return mo(D,s,D,d,"text","text");return x}selectStart(){return this.select(0,0)}selectEnd(){let s=this.getTextContentSize();return this.select(s,s)}spliceText(s,d,x,A){let D=this.getWritable(),z=D.__text,ie=x.length,xe=s;0>xe&&(xe=ie+xe,0>xe&&(xe=0));let Re=hn();return A&&Lt(Re)&&(s+=ie,Re.setTextNodeRange(D,s,D,s)),d=z.slice(0,xe)+x+z.slice(xe+d),D.__text=d,D}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...s){nr();var d=this.getLatest(),x=d.getTextContent(),A=d.__key,D=Vt(),z=new Set(s);s=[];for(var ie=x.length,xe="",Re=0;Re<ie;Re++)xe!==""&&z.has(Re)&&(s.push(xe),xe=""),xe+=x[Re];if(xe!==""&&s.push(xe),z=s.length,z===0)return[];if(s[0]===x)return[d];var Ue=s[0];x=d.getParentOrThrow(),Re=d.getFormat();let Ze=d.getStyle(),Ge=d.__detail;ie=!1,d.isSegmented()?(xe=jn(Ue),xe.__format=Re,xe.__style=Ze,xe.__detail=Ge,ie=!0):(xe=d.getWritable(),xe.__text=Ue),d=hn(),xe=[xe],Ue=Ue.length;for(let vt=1;vt<z;vt++){var Ie=s[vt],it=Ie.length;Ie=jn(Ie).getWritable(),Ie.__format=Re,Ie.__style=Ze,Ie.__detail=Ge;let $t=Ie.__key;if(it=Ue+it,Lt(d)){let Ut=d.anchor,$n=d.focus;Ut.key===A&&Ut.type==="text"&&Ut.offset>Ue&&Ut.offset<=it&&(Ut.key=$t,Ut.offset-=Ue,d.dirty=!0),$n.key===A&&$n.type==="text"&&$n.offset>Ue&&$n.offset<=it&&($n.key=$t,$n.offset-=Ue,d.dirty=!0)}D===A&&Dt($t),Ue=it,xe.push(Ie)}return A=this.getPreviousSibling(),D=this.getNextSibling(),A!==null&&kt(A),D!==null&&kt(D),A=x.getWritable(),D=this.getIndexWithinParent(),ie?(A.splice(D,0,xe),this.remove()):A.splice(D,1,xe),Lt(d)&&Li(d,x,D,z-1),xe}mergeWithSibling(s){var d=s===this.getPreviousSibling();d||s===this.getNextSibling()||B(50);var x=this.__key;let A=s.__key,D=this.__text,z=D.length;Vt()===A&&Dt(x);let ie=hn();if(Lt(ie)){let xe=ie.anchor,Re=ie.focus;xe!==null&&xe.key===A&&(si(xe,d,x,s,z),ie.dirty=!0),Re!==null&&Re.key===A&&(si(Re,d,x,s,z),ie.dirty=!0)}return x=s.__text,this.setTextContent(d?x+D:D+x),d=this.getWritable(),s.remove(),d}isTextEntity(){return!1}}function mt(f){let s=f.style.fontWeight==="700",d=f.style.textDecoration==="line-through",x=f.style.fontStyle==="italic",A=f.style.textDecoration==="underline",D=f.style.verticalAlign;return{forChild:z=>(Nt(z)&&(s&&z.toggleFormat("bold"),d&&z.toggleFormat("strikethrough"),x&&z.toggleFormat("italic"),A&&z.toggleFormat("underline"),D==="sub"&&z.toggleFormat("subscript"),D==="super"&&z.toggleFormat("superscript")),z),node:null}}function Ks(f){let s=f.style.fontWeight==="normal";return{forChild:d=>(Nt(d)&&!s&&d.toggleFormat("bold"),d),node:null}}let ts=new WeakMap;function Us(f){f.parentElement===null&&B(129);for(var s=f.textContent||"",d,x=f.parentNode,A=[f];x!==null&&(d=ts.get(x))===void 0&&!(x.nodeName==="PRE"||x.nodeType===1&&x.style!==void 0&&x.style.whiteSpace!==void 0&&x.style.whiteSpace.startsWith("pre"));)A.push(x),x=x.parentNode;for(d=d===void 0?x:d,x=0;x<A.length;x++)ts.set(A[x],d);if(d!==null){for(s=s.split(/(\r?\n|\t)/),f=[],A=s.length,d=0;d<A;d++)x=s[d],x===`
259
- `||x===`\r
260
- `?f.push($i()):x===" "?f.push(Ys()):x!==""&&f.push(jn(x));return{node:f}}if(s=s.replace(/\r/g,"").replace(/[ \t\n]+/g," "),s==="")return{node:null};if(s[0]===" "){for(A=f,d=!0;A!==null&&(A=pd(A,!1))!==null;)if(x=A.textContent||"",0<x.length){/[ \t\n]$/.test(x)&&(s=s.slice(1)),d=!1;break}d&&(s=s.slice(1))}if(s[s.length-1]===" "){for(A=!0;f!==null&&(f=pd(f,!0))!==null;)if(0<(f.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){A=!1;break}A&&(s=s.slice(0,s.length-1))}return s===""?{node:null}:{node:jn(s)}}let Eh=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function pd(f,s){for(;;){for(var d=void 0;(d=s?f.nextSibling:f.previousSibling)===null;)if(f=f.parentElement,f===null)return null;if(f=d,f.nodeType===1&&(d=f.style.display,d===""&&f.nodeName.match(Eh)===null||d!==""&&!d.startsWith("inline")))return null;for(;(d=s?f.firstChild:f.lastChild)!==null;)f=d;if(f.nodeType===3)return f;if(f.nodeName==="BR")return null}}let Ch={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ri(f){let s=Ch[f.nodeName.toLowerCase()];return s===void 0?{node:null}:{forChild:d=>(Nt(d)&&!d.hasFormat(s)&&d.toggleFormat(s),d),node:null}}function jn(f=""){return ei(new ni(f))}function Nt(f){return f instanceof ni}class Ro extends ni{static getType(){return"tab"}static clone(s){let d=new Ro(s.__key);return d.__text=s.__text,d.__format=s.__format,d.__style=s.__style,d}constructor(s){super(" ",s),this.__detail=2}static importDOM(){return null}static importJSON(s){let d=Ys();return d.setFormat(s.format),d.setStyle(s.style),d}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){B(126)}setDetail(){B(127)}setMode(){B(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ys(){return ei(new Ro)}function Bc(f){return f instanceof Ro}class tr{constructor(s,d,x){this._selection=null,this.key=s,this.offset=d,this.type=x}is(s){return this.key===s.key&&this.offset===s.offset&&this.type===s.type}isBefore(s){let d=this.getNode(),x=s.getNode(),A=this.offset;if(s=s.offset,nt(d)){var D=d.getDescendantByIndex(A);d=D??d}return nt(x)&&(D=x.getDescendantByIndex(s),x=D??x),d===x?A<s:d.isBefore(x)}getNode(){let s=sn(this.key);return s===null&&B(20),s}set(s,d,x){let A=this._selection,D=this.key;this.key=s,this.offset=d,this.type=x,va()||(Vt()===D&&Dt(s),A!==null&&(A.setCachedNodes(null),A.dirty=!0))}}function qs(f,s){let d=s.__key,x=f.offset,A="element";if(Nt(s))A="text",s=s.getTextContentSize(),x>s&&(x=s);else if(!nt(s)){var D=s.getNextSibling();Nt(D)?(d=D.__key,x=0,A="text"):(D=s.getParent())&&(d=D.__key,x=s.getIndexWithinParent()+1)}f.set(d,x,A)}function ha(f,s){if(nt(s)){let d=s.getLastDescendant();nt(d)||Nt(d)?qs(f,d):qs(f,s)}else qs(f,s)}function Zs(f,s,d,x){let A=f.getNode(),D=A.getChildAtIndex(f.offset),z=jn(),ie=Ar(A)?bo().append(z):z;z.setFormat(d),z.setStyle(x),D===null?A.append(ie):D.insertBefore(ie),f.is(s)&&s.set(z.__key,0,"text"),f.set(z.__key,0,"text")}function oi(f,s,d,x){f.key=s,f.offset=d,f.type=x}class ns{constructor(s,d){this.anchor=s,this.focus=d,s._selection=this,d._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Wr(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return rs(this)}}class pa{constructor(s){this.dirty=!1,this._nodes=s,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){if(!ii(s))return!1;let d=this._nodes,x=s._nodes;return d.size===x.size&&Array.from(d).every(A=>x.has(A))}add(s){this.dirty=!0,this._nodes.add(s),this._cachedNodes=null}delete(s){this.dirty=!0,this._nodes.delete(s),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(s){return this._nodes.has(s)}clone(){return new pa(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.getNodes(),x=d.length;var A=d[x-1];if(Nt(A))A=A.select();else{let D=A.getIndexWithinParent()+1;A=A.getParentOrThrow().select(D,D)}for(A.insertNodes(s),s=0;s<x;s++)d[s].remove()}getNodes(){var s=this._cachedNodes;if(s!==null)return s;var d=this._nodes;s=[];for(let x of d)d=sn(x),d!==null&&s.push(d);return va()||(this._cachedNodes=s),s}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function Lt(f){return f instanceof Pi}function Wr(f){return f instanceof ns}function Wc(f){let[s,,d]=Js(f);f=d.getChildren();let x=f.length;var A=f[0].getChildren().length;let D=Array(x);for(var z=0;z<x;z++)D[z]=Array(A);for(A=0;A<x;A++){z=f[A].getChildren();let ie=0;for(let xe=0;xe<z.length;xe++){for(;D[A][ie];)ie++;let Re=z[xe],Ue=Re.__rowSpan||1,Ze=Re.__colSpan||1;for(let Ge=0;Ge<Ue;Ge++)for(let Ie=0;Ie<Ze;Ie++)D[A+Ge][ie+Ie]=Re;if(s===Re)return{colSpan:Ze,columnIndex:ie,rowIndex:A,rowSpan:Ue};ie+=Ze}}return null}class Mi extends ns{constructor(s,d,x){super(d,x),this.gridKey=s}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return gd(s)?this.gridKey===s.gridKey&&this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}set(s,d,x){this.dirty=!0,this.gridKey=s,this.anchor.key=d,this.focus.key=x,this._cachedNodes=null}clone(){return new Mi(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.focus.getNode();ut(d.select(0,d.getChildrenSize())).insertNodes(s)}getShape(){var s=sn(this.anchor.key);if(zr(s)||B(103),s=Wc(s),s===null)throw Error("getCellRect: expected to find AnchorNode");var d=sn(this.focus.key);zr(d)||B(104);let x=Wc(d);if(x===null)throw Error("getCellRect: expected to find focusCellNode");d=Math.min(s.columnIndex,x.columnIndex);let A=Math.max(s.columnIndex,x.columnIndex),D=Math.min(s.rowIndex,x.rowIndex);return s=Math.max(s.rowIndex,x.rowIndex),{fromX:Math.min(d,A),fromY:Math.min(D,s),toX:Math.max(d,A),toY:Math.max(D,s)}}getNodes(){function s($t){let{cell:Ut,startColumn:$n,startRow:Xn}=$t;Re=Math.min(Re,$n),Ue=Math.min(Ue,Xn),Ze=Math.max(Ze,$n+Ut.__colSpan-1),Ge=Math.max(Ge,Xn+Ut.__rowSpan-1)}var d=this._cachedNodes;if(d!==null)return d;var x=this.anchor.getNode();d=this.focus.getNode();var A=Fs(x,zr);x=Fs(d,zr),zr(A)||B(103),zr(x)||B(104),d=A.getParent(),ls(d)||B(105),d=d.getParent(),qc(d)||B(106);var D=x.getParents()[1];if(D!==d){if(d.isParentOf(x)){if(d=D.getParent(),d==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,x.getKey(),d.getKey())}else{if(d=d.getParent(),d==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,d.getKey(),x.getKey())}return this.getNodes()}let[z,ie,xe]=$o(d,A,x),Re=Math.min(ie.startColumn,xe.startColumn),Ue=Math.min(ie.startRow,xe.startRow),Ze=Math.max(ie.startColumn+ie.cell.__colSpan-1,xe.startColumn+xe.cell.__colSpan-1),Ge=Math.max(ie.startRow+ie.cell.__rowSpan-1,xe.startRow+xe.cell.__rowSpan-1);x=Re,A=Ue,D=Re;for(var Ie=Ue;Re<x||Ue<A||Ze>D||Ge>Ie;){if(Re<x){var it=Ie-A;--x;for(var vt=0;vt<=it;vt++)s(z[A+vt][x])}if(Ue<A)for(it=D-x,--A,vt=0;vt<=it;vt++)s(z[A][x+vt]);if(Ze>D)for(it=Ie-A,D+=1,vt=0;vt<=it;vt++)s(z[A+vt][D]);if(Ge>Ie)for(it=D-x,Ie+=1,vt=0;vt<=it;vt++)s(z[Ie][x+vt])}for(d=[d],x=null,A=Ue;A<=Ge;A++)for(D=Re;D<=Ze;D++)({cell:Ie}=z[A][D]),it=Ie.getParent(),ls(it)||B(107),it!==x&&d.push(it),d.push(Ie,...Nc(Ie)),x=it;return va()||(this._cachedNodes=d),d}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function gd(f){return f instanceof Mi}class Pi extends ns{constructor(s,d,x,A){super(s,d),this.format=x,this.style=A}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Lt(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus)&&this.format===s.format&&this.style===s.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var s=this._cachedNodes;if(s!==null)return s;s=this.anchor;var d=this.focus,x=s.isBefore(d),A=x?s:d;x=x?d:s,s=A.getNode(),d=x.getNode();let D=A.offset;return A=x.offset,nt(s)&&(x=s.getDescendantByIndex(D),s=x??s),nt(d)&&(x=d.getDescendantByIndex(A),x!==null&&x!==s&&d.getChildAtIndex(A)===x&&(x=x.getPreviousSibling()),d=x??d),s=s.is(d)?nt(s)&&0<s.getChildrenSize()?[]:[s]:s.getNodesBetween(d),va()||(this._cachedNodes=s),s}setTextNodeRange(s,d,x,A){oi(this.anchor,s.__key,d,"text"),oi(this.focus,x.__key,A,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let s=this.getNodes();if(s.length===0)return"";let d=s[0],x=s[s.length-1],A=this.anchor,D=this.focus,z=A.isBefore(D),[ie,xe]=rs(this),Re="",Ue=!0;for(let Ze=0;Ze<s.length;Ze++){let Ge=s[Ze];if(nt(Ge)&&!Ge.isInline())Ue||(Re+=`
261
- `),Ue=!Ge.isEmpty();else if(Ue=!1,Nt(Ge)){let Ie=Ge.getTextContent();Ge===d?Ge===x?(A.type!=="element"||D.type!=="element"||D.offset===A.offset)&&(Ie=ie<xe?Ie.slice(ie,xe):Ie.slice(xe,ie)):Ie=z?Ie.slice(ie):Ie.slice(xe):Ge===x&&(Ie=z?Ie.slice(0,xe):Ie.slice(0,ie)),Re+=Ie}else!on(Ge)&&!Di(Ge)||Ge===x&&this.isCollapsed()||(Re+=Ge.getTextContent())}return Re}applyDOMRange(s){let d=bn(),x=d.getEditorState()._selection;if(s=mr(s.startContainer,s.startOffset,s.endContainer,s.endOffset,d,x),s!==null){var[A,D]=s;oi(this.anchor,A.key,A.offset,A.type),oi(this.focus,D.key,D.offset,D.type),this._cachedNodes=null}}clone(){let s=this.anchor,d=this.focus;return new Pi(new tr(s.key,s.offset,s.type),new tr(d.key,d.offset,d.type),this.format,this.style)}toggleFormat(s){this.format=qe(this.format,s,null),this.dirty=!0}setStyle(s){this.style=s,this.dirty=!0}hasFormat(s){return(this.format&le[s])!==0}insertRawText(s){s=s.split(/(\r?\n|\t)/);let d=[],x=s.length;for(let A=0;A<x;A++){let D=s[A];D===`
262
- `||D===`\r
263
- `?d.push($i()):D===" "?d.push(Ys()):d.push(jn(D))}this.insertNodes(d)}insertText(s){var d=this.anchor,x=this.focus,A=this.isCollapsed()||d.isBefore(x),D=this.format,z=this.style;A&&d.type==="element"?Zs(d,x,D,z):A||x.type!=="element"||Zs(x,d,D,z);var ie=this.getNodes(),xe=ie.length,Re=A?x:d;x=(A?d:x).offset;var Ue=Re.offset;d=ie[0],Nt(d)||B(26),A=d.getTextContent().length;var Ze=d.getParentOrThrow(),Ge=ie[xe-1];if(this.isCollapsed()&&x===A&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!Ze.canInsertTextAfter()&&d.getNextSibling()===null)){var Ie=d.getNextSibling();if(Nt(Ie)&&Ie.canInsertTextBefore()&&!_t(Ie)||(Ie=jn(),Ie.setFormat(D),Ze.canInsertTextAfter()?d.insertAfter(Ie):Ze.insertAfter(Ie)),Ie.select(0,0),d=Ie,s!==""){this.insertText(s);return}}else if(this.isCollapsed()&&x===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!Ze.canInsertTextBefore()&&d.getPreviousSibling()===null)){if(Ie=d.getPreviousSibling(),(!Nt(Ie)||_t(Ie))&&(Ie=jn(),Ie.setFormat(D),Ze.canInsertTextBefore()?d.insertBefore(Ie):Ze.insertBefore(Ie)),Ie.select(),d=Ie,s!==""){this.insertText(s);return}}else if(d.isSegmented()&&x!==A)Ze=jn(d.getTextContent()),Ze.setFormat(D),d.replace(Ze),d=Ze;else if(!(this.isCollapsed()||s===""||(Ie=Ge.getParent(),Ze.canInsertTextBefore()&&Ze.canInsertTextAfter()&&(!nt(Ie)||Ie.canInsertTextBefore()&&Ie.canInsertTextAfter())))){this.insertText(""),Bn(this.anchor,this.focus,null),this.insertText(s);return}if(xe===1)if(d.isToken())s=jn(s),s.select(),d.replace(s);else{if(ie=d.getFormat(),xe=d.getStyle(),x===Ue&&(ie!==D||xe!==z))if(d.getTextContent()==="")d.setFormat(D),d.setStyle(z);else{ie=jn(s),ie.setFormat(D),ie.setStyle(z),ie.select(),x===0?d.insertBefore(ie,!1):([xe]=d.splitText(x),xe.insertAfter(ie,!1)),ie.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length);return}else if(Bc(d)){s=jn(s),s.setFormat(D),s.setStyle(z),s.select(),d.replace(s);return}d=d.spliceText(x,Ue-x,s,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=s.length:(this.format=ie,this.style=xe))}else{if(D=new Set([...d.getParentKeys(),...Ge.getParentKeys()]),Ie=nt(d)?d:d.getParentOrThrow(),z=nt(Ge)?Ge:Ge.getParentOrThrow(),Ze=Ge,!Ie.is(z)&&z.isInline())do Ze=z,z=z.getParentOrThrow();while(z.isInline());if(Re.type==="text"&&(Ue!==0||Ge.getTextContent()==="")||Re.type==="element"&&Ge.getIndexWithinParent()<Ue)if(Nt(Ge)&&!Ge.isToken()&&Ue!==Ge.getTextContentSize()){if(Ge.isSegmented()){var it=jn(Ge.getTextContent());Ge.replace(it),Ge=it}Ar(Re.getNode())||Re.type!=="text"||(Ge=Ge.spliceText(0,Ue,"")),D.add(Ge.__key)}else Re=Ge.getParentOrThrow(),Re.canBeEmpty()||Re.getChildrenSize()!==1?Ge.remove():Re.remove();else D.add(Ge.__key);for(Re=z.getChildren(),Ue=new Set(ie),Ge=Ie.is(z),Ie=Ie.isInline()&&d.getNextSibling()===null?Ie:d,it=Re.length-1;0<=it;it--){let vt=Re[it];if(vt.is(d)||nt(vt)&&vt.isParentOf(d))break;vt.isAttached()&&(!Ue.has(vt)||vt.is(Ze)?Ge||Ie.insertAfter(vt,!1):vt.remove())}if(!Ge)for(Re=z,z=null;Re!==null;)Ue=Re.getChildren(),Ge=Ue.length,(Ge===0||Ue[Ge-1].is(z))&&(D.delete(Re.__key),z=Re),Re=Re.getParent();for(d.isToken()?x===A?d.select():(s=jn(s),s.select(),d.replace(s)):(d=d.spliceText(x,A-x,s,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length)),s=1;s<xe;s++)d=ie[s],D.has(d.__key)||d.remove()}}removeText(){this.insertText("")}formatText(s){if(this.isCollapsed())this.toggleFormat(s),Dt(null);else{var d=this.getNodes(),x=[];for(var A of d)Nt(A)&&x.push(A);var D=x.length;if(D===0)this.toggleFormat(s),Dt(null);else{A=this.anchor;var z=this.focus,ie=this.isBackward();d=ie?z:A,A=ie?A:z;var xe=0,Re=x[0];if(z=d.type==="element"?0:d.offset,d.type==="text"&&z===Re.getTextContentSize()&&(xe=1,Re=x[1],z=0),Re!=null){ie=Re.getFormatFlags(s,null);var Ue=D-1,Ze=x[Ue];if(D=A.type==="text"?A.offset:Ze.getTextContentSize(),Re.is(Ze))z!==D&&(z===0&&D===Re.getTextContentSize()?Re.setFormat(ie):(s=Re.splitText(z,D),s=z===0?s[0]:s[1],s.setFormat(ie),d.type==="text"&&d.set(s.__key,0,"text"),A.type==="text"&&A.set(s.__key,D-z,"text")),this.format=ie);else{z!==0&&([,Re]=Re.splitText(z),z=0),Re.setFormat(ie);var Ge=Ze.getFormatFlags(s,ie);for(0<D&&(D!==Ze.getTextContentSize()&&([Ze]=Ze.splitText(D)),Ze.setFormat(Ge)),xe+=1;xe<Ue;xe++){let Ie=x[xe];if(!Ie.isToken()){let it=Ie.getFormatFlags(s,Ge);Ie.setFormat(it)}}d.type==="text"&&d.set(Re.__key,z,"text"),A.type==="text"&&A.set(Ze.__key,D,"text"),this.format=ie|Ge}}}}}insertNodes(s){if(s.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var d=hn();if(!Lt(d))throw Error("Expected RangeSelection after insertParagraph");return d.insertNodes(s)}var x=Sc(this.anchor.getNode(),Si);if(d=s[s.length-1],"__language"in x)if("__language"in s[0])this.insertText(s[0].getTextContent());else{var A=Fi(this);x.splice(A,0,s),d.selectEnd()}else if(s.some(ie=>(nt(ie)||on(ie))&&!ie.isInline())){d=Xs(s),s=d.getLastDescendant();var D=d.getChildren();d=nt(x)&&x.isEmpty()?null:this.insertParagraph(),A=D[D.length-1];var z=D[0];(ie=>nt(ie)&&Si(ie)&&!ie.isEmpty()&&nt(x)&&(!x.isEmpty()||"__value"in x&&"__checked"in x))(z)&&(x.append(...z.getChildren()),z=D[1]),z&&Xa(x,z),D=Sc(s,Si),d&&nt(D)&&("__value"in d&&"__checked"in d||Si(A))&&(D.append(...d.getChildren()),d.remove()),nt(x)&&x.isEmpty()&&x.remove(),s.selectEnd(),s=nt(x)?x.getLastChild():null,Di(s)&&D!==x&&s.remove()}else A=Fi(this),x.splice(A,0,s),d.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var s=bo();return Zn().splice(this.anchor.offset,0,[s]),s.select(),s}var d=Fi(this);return s=Sc(this.anchor.getNode(),Si),d=(d=s.getChildAtIndex(d))?[d,...d.getNextSiblings()]:[],(s=s.insertNewAfter(this,!1))?(s.append(...d),s.selectStart(),s):null}insertLineBreak(s){var d=$i();this.insertNodes([d]),s&&(s=d.getParentOrThrow(),d=d.getIndexWithinParent(),s.select(d,d))}extract(){var s=this.getNodes(),d=s.length,x=d-1,A=this.anchor;let D=this.focus;var z=s[0];let ie=s[x],[xe,Re]=rs(this);return d===0?[]:d===1?Nt(z)&&!this.isCollapsed()?(s=xe>Re?Re:xe,x=z.splitText(s,xe>Re?xe:Re),s=s===0?x[0]:x[1],s!=null?[s]:[]):[z]:(d=A.isBefore(D),Nt(z)&&(A=d?xe:Re,A===z.getTextContentSize()?s.shift():A!==0&&([,z]=z.splitText(A),s[0]=z)),Nt(ie)&&(z=ie.getTextContent().length,d=d?Re:xe,d===0?s.pop():d!==z&&([ie]=ie.splitText(d),s[x]=ie)),s)}modify(s,d,x){var A=this.focus,D=this.anchor,z=s==="move",ie=At(A,d);if(on(ie)&&!ie.isIsolated())z&&ie.isKeyboardSelectable()?(d=yo(),d.add(ie.__key),Er(d)):(s=d?ie.getPreviousSibling():ie.getNextSibling(),Nt(s)?(ie=s.__key,d=d?s.getTextContent().length:0,A.set(ie,d,"text"),z&&D.set(ie,d,"text")):(x=ie.getParentOrThrow(),nt(s)?(x=s.__key,ie=d?s.getChildrenSize():0):(ie=ie.getIndexWithinParent(),x=x.__key,d||ie++),A.set(x,ie,"element"),z&&D.set(x,ie,"element")));else if(D=bn(),A=go(D._window)){var xe=D._blockCursorElement,Re=D._rootElement;if(Re===null||xe===null||!nt(ie)||ie.isInline()||ie.canBeEmpty()||Tc(xe,D,Re),A.modify(s,d?"backward":"forward",x),0<A.rangeCount&&(ie=A.getRangeAt(0),D=this.anchor.getNode(),D=Ar(D)?D:Jn(D),this.applyDOMRange(ie),this.dirty=!0,!z)){for(z=this.getNodes(),s=[],x=!1,xe=0;xe<z.length;xe++)Re=z[xe],Cr(Re,D)?s.push(Re):x=!0;x&&0<s.length&&(d?(d=s[0],nt(d)?d.selectStart():d.getParentOrThrow().selectStart()):(d=s[s.length-1],nt(d)?d.selectEnd():d.getParentOrThrow().selectEnd())),(A.anchorNode!==ie.startContainer||A.anchorOffset!==ie.startOffset)&&(d=this.focus,z=this.anchor,A=z.key,ie=z.offset,D=z.type,oi(z,d.key,d.offset,d.type),oi(d,A,ie,D),this._cachedNodes=null)}}}deleteCharacter(s){let d=this.isCollapsed();if(this.isCollapsed()){var x=this.anchor,A=this.focus,D=x.getNode();if(!s&&(x.type==="element"&&nt(D)&&x.offset===D.getChildrenSize()||x.type==="text"&&x.offset===D.getTextContentSize())){var z=D.getParent();if(z=D.getNextSibling()||(z===null?null:z.getNextSibling()),nt(z)&&z.isShadowRoot())return}if(z=At(A,s),on(z)&&!z.isIsolated()){z.isKeyboardSelectable()&&nt(D)&&D.getChildrenSize()===0?(D.remove(),s=yo(),s.add(z.__key),Er(s)):(z.remove(),bn().dispatchCommand(e,void 0));return}if(!s&&nt(z)&&nt(D)&&D.isEmpty()){D.remove(),z.selectStart();return}if(this.modify("extend",s,"character"),this.isCollapsed()){if(s&&x.offset===0&&(x.type==="element"?x.getNode():x.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(z=A.type==="text"?A.getNode():null,D=x.type==="text"?x.getNode():null,z!==null&&z.isSegmented()){if(x=A.offset,A=z.getTextContentSize(),z.is(D)||s&&x!==A||!s&&x!==0){md(z,s,x);return}}else if(D!==null&&D.isSegmented()&&(x=x.offset,A=D.getTextContentSize(),D.is(z)||s&&x!==0||!s&&x!==A)){md(D,s,x);return}if(D=this.anchor,z=this.focus,x=D.getNode(),A=z.getNode(),x===A&&D.type==="text"&&z.type==="text"){var ie=D.offset,xe=z.offset;let Re=ie<xe;A=Re?ie:xe,xe=Re?xe:ie,ie=xe-1,A!==ie&&(x=x.getTextContent().slice(A,xe),aa(x)||(s?z.offset=ie:D.offset=ie))}}}this.removeText(),s&&!d&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(s=this.anchor.getNode(),s.isEmpty()&&Ar(s.getParent())&&s.getIndexWithinParent()===0&&s.collapseAtStart(this))}deleteLine(s){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",s,"lineboundary"),(s?this.focus:this.anchor).offset===0&&this.modify("extend",s,"character")),this.removeText()}deleteWord(s){this.isCollapsed()&&this.modify("extend",s,"word"),this.removeText()}}function ii(f){return f instanceof pa}function ga(f){let s=f.offset;return f.type==="text"?s:(f=f.getNode(),s===f.getChildrenSize()?f.getTextContent().length:0)}function rs(f){let s=f.anchor;return f=f.focus,s.type==="element"&&f.type==="element"&&s.key===f.key&&s.offset===f.offset?[0,0]:[ga(s),ga(f)]}function md(f,s,d){let x=f.getTextContent().split(/(?=\s)/g),A=x.length,D=0,z=0;for(let ie=0;ie<A;ie++){let xe=x[ie],Re=ie===A-1;if(z=D,D+=xe.length,s&&D===d||D>d||Re){x.splice(ie,1),Re&&(z=void 0);break}}s=x.join("").trim(),s===""?f.remove():(f.setTextContent(s),f.select(z,z))}function zc(f,s,d,x){var A=s;if(f.nodeType===1){let ie=!1;var D=f.childNodes,z=D.length;A===z&&(ie=!0,A=z-1);let xe=D[A];if(z=!1,xe===x._blockCursorElement?(xe=D[A+1],z=!0):x._blockCursorElement!==null&&A--,x=po(xe),Nt(x))A=ie?x.getTextContentSize():0;else{if(D=po(f),D===null)return null;if(nt(D)?(f=D.getChildAtIndex(A),(s=nt(f))&&(s=f.getParent(),s=d===null||s===null||!s.canBeEmpty()||s!==d.getNode()),s&&(d=ie?f.getLastDescendant():f.getFirstDescendant(),d===null?(D=f,A=0):(f=d,D=nt(f)?f:f.getParentOrThrow())),Nt(f)?(x=f,D=null,A=ie?f.getTextContentSize():0):f!==D&&ie&&!z&&A++):(A=D.getIndexWithinParent(),A=s===0&&on(D)&&po(f)===D?A:A+1,D=D.getParentOrThrow()),nt(D))return new tr(D.__key,A,"element")}}else x=po(f);return Nt(x)?new tr(x.__key,A,"text"):null}function yd(f,s,d){var x=f.offset,A=f.getNode();x===0?(x=A.getPreviousSibling(),A=A.getParent(),s?(d||!s)&&x===null&&nt(A)&&A.isInline()&&(s=A.getPreviousSibling(),Nt(s)&&(f.key=s.__key,f.offset=s.getTextContent().length)):nt(x)&&!d&&x.isInline()?(f.key=x.__key,f.offset=x.getChildrenSize(),f.type="element"):Nt(x)&&(f.key=x.__key,f.offset=x.getTextContent().length)):x===A.getTextContent().length&&(x=A.getNextSibling(),A=A.getParent(),s&&nt(x)&&x.isInline()?(f.key=x.__key,f.offset=0,f.type="element"):(d||s)&&x===null&&nt(A)&&A.isInline()&&!A.canInsertTextAfter()&&(s=A.getNextSibling(),Nt(s)&&(f.key=s.__key,f.offset=0)))}function Bn(f,s,d){if(f.type==="text"&&s.type==="text"){var x=f.isBefore(s);let A=f.is(s);yd(f,x,A),yd(s,!x,A),A&&(s.key=f.key,s.offset=f.offset,s.type=f.type),x=bn(),x.isComposing()&&x._compositionKey!==f.key&&Lt(d)&&(x=d.anchor,d=d.focus,oi(f,x.key,x.offset,x.type),oi(s,d.key,d.offset,d.type))}}function mr(f,s,d,x,A,D){return f===null||d===null||!lt(A,f,d)||(s=zc(f,s,Lt(D)?D.anchor:null,A),s===null)||(x=zc(d,x,Lt(D)?D.focus:null,A),x===null||s.type==="element"&&x.type==="element"&&(f=po(f),d=po(d),on(f)&&on(d)))?null:(Bn(s,x,D),[s,x])}function mo(f,s,d,x,A,D){let z=eo();return f=new Pi(new tr(f,s,A),new tr(d,x,D),0,""),f.dirty=!0,z._selection=f}function yo(){return new pa(new Set)}function wr(f){let s=f.getEditorState()._selection,d=go(f._window);return Lt(s)||s==null?Ii(s,d,f):s.clone()}function Ii(f,s,d){var x=d._window;if(x===null)return null;var A=x.event,D=A?A.type:void 0;x=D==="selectionchange",A=!st&&(x||D==="beforeinput"||D==="compositionstart"||D==="compositionend"||D==="click"&&A&&A.detail===3||D==="drop"||D===void 0);let z;if(!Lt(f)||A){if(s===null)return null;if(A=s.anchorNode,D=s.focusNode,z=s.anchorOffset,s=s.focusOffset,x&&Lt(f)&&!lt(d,A,D))return f.clone()}else return f.clone();if(d=mr(A,z,D,s,d,f),d===null)return null;let[ie,xe]=d;return new Pi(ie,xe,Lt(f)?f.format:0,Lt(f)?f.style:"")}function hn(){return eo()._selection}function ai(){return bn()._editorState._selection}function Li(f,s,d,x=1){var A=f.anchor,D=f.focus,z=A.getNode(),ie=D.getNode();if(s.is(z)||s.is(ie)){if(z=s.__key,f.isCollapsed())s=A.offset,(d<=s&&0<x||d<s&&0>x)&&(d=Math.max(0,s+x),A.set(z,d,"element"),D.set(z,d,"element"),os(f));else{let Re=f.isBackward();ie=Re?D:A;var xe=ie.getNode();A=Re?A:D,D=A.getNode(),s.is(xe)&&(xe=ie.offset,(d<=xe&&0<x||d<xe&&0>x)&&ie.set(z,Math.max(0,xe+x),"element")),s.is(D)&&(s=A.offset,(d<=s&&0<x||d<s&&0>x)&&A.set(z,Math.max(0,s+x),"element"))}os(f)}}function os(f){var s=f.anchor,d=s.offset;let x=f.focus;var A=x.offset,D=s.getNode(),z=x.getNode();if(f.isCollapsed())nt(D)&&(z=D.getChildrenSize(),z=(A=d>=z)?D.getChildAtIndex(z-1):D.getChildAtIndex(d),Nt(z)&&(d=0,A&&(d=z.getTextContentSize()),s.set(z.__key,d,"text"),x.set(z.__key,d,"text")));else{if(nt(D)){let ie=D.getChildrenSize();d=(f=d>=ie)?D.getChildAtIndex(ie-1):D.getChildAtIndex(d),Nt(d)&&(D=0,f&&(D=d.getTextContentSize()),s.set(d.__key,D,"text"))}nt(z)&&(d=z.getChildrenSize(),A=(s=A>=d)?z.getChildAtIndex(d-1):z.getChildAtIndex(A),Nt(A)&&(z=0,s&&(z=A.getTextContentSize()),x.set(A.__key,z,"text")))}}function Hc(f,s){if(s=s.getEditorState()._selection,f=f._selection,Lt(f)){var d=f.anchor;let x=f.focus,A;d.type==="text"&&(A=d.getNode(),A.selectionTransform(s,f)),x.type==="text"&&(d=x.getNode(),A!==d&&d.selectionTransform(s,f))}}function ma(f,s,d,x,A){let D=null,z=0,ie=null;x!==null?(D=x.__key,Nt(x)?(z=x.getTextContentSize(),ie="text"):nt(x)&&(z=x.getChildrenSize(),ie="element")):A!==null&&(D=A.__key,Nt(A)?ie="text":nt(A)&&(ie="element")),D!==null&&ie!==null?f.set(D,z,ie):(z=s.getIndexWithinParent(),z===-1&&(z=d.getChildrenSize()),f.set(d.__key,z,"element"))}function si(f,s,d,x,A){f.type==="text"?(f.key=d,s||(f.offset+=A)):f.offset>x.getIndexWithinParent()&&--f.offset}function $o(f,s,d){let x=[],A=null,D=null;f=f.getChildren();for(let Ue=0;Ue<f.length;Ue++){var z=f[Ue];ls(z)||B(108);var ie=z.getChildren();z=0;for(let Ze of ie){for(zr(Ze)||B(109);x[Ue]!==void 0&&x[Ue][z]!==void 0;)z++;ie=Ue;var xe=z,Re=Ze;let Ge={cell:Re,startColumn:xe,startRow:ie},Ie=Re.__rowSpan,it=Re.__colSpan;for(let vt=0;vt<Ie;vt++){x[ie+vt]===void 0&&(x[ie+vt]=[]);for(let $t=0;$t<it;$t++)x[ie+vt][xe+$t]=Ge}s.is(Re)&&(A=Ge),d.is(Re)&&(D=Ge),z+=Ze.__colSpan}}return A===null&&B(110),D===null&&B(111),[x,A,D]}function Js(f){f instanceof Uc||(f instanceof ua?(f=Fs(f,zr),zr(f)||B(114)):(f=Fs(f.getNode(),zr),zr(f)||B(114)));let s=f.getParent();ls(s)||B(115);let d=s.getParent();return qc(d)||B(116),[f,s,d]}function Fi(f){f.isCollapsed()||f.removeText();var s=f.anchor,d=s.getNode();if(!Nt(d))return s.offset;let x=d.getParent();return x?(d=d.splitText(s.offset),d.length===0?0:(s=s.offset===0?0:1,d=d[0].getIndexWithinParent()+s,!x.isInline()||d===0?d:((d=x.getChildAtIndex(d))&&x.insertNewAfter(f).append(d,...d.getNextSiblings()),x.getIndexWithinParent()+s))):(f=bo(),Zn().append(f),f.select(),0)}function Xs(f){let s=bo(),d=null;for(let x=0;x<f.length;x++){let A=f[x],D=Di(A);if(D||on(A)&&A.isInline()||nt(A)&&A.isInline()||Nt(A)||A.isParentRequired()){if(d===null&&(d=A.createParentElementNode(),s.append(d),D))continue;d!==null&&d.append(A)}else s.append(A),d=null}return s}let Wn=null,vn=null,Or=!1,Qs=!1,ya=0,is={characterData:!0,childList:!0,subtree:!0};function va(){return Or||Wn!==null&&Wn._readOnly}function nr(){Or&&B(13)}function eo(){return Wn===null&&B(15),Wn}function bn(){return vn===null&&B(16),vn}function Gc(f,s,d){var x=s.__type;let A=f._nodes.get(x);for(A===void 0&&B(30,x),f=d.get(x),f===void 0&&(f=Array.from(A.transforms),d.set(x,f)),d=f.length,x=0;x<d&&(f[x](s),s.isAttached());x++);}function wh(f,s){s=s._dirtyLeaves,f=f._nodeMap;for(let d of s)s=f.get(d),Nt(s)&&s.isAttached()&&s.isSimpleText()&&!s.isUnmergeable()&&tt(s)}function el(f,s){let d=s._dirtyLeaves,x=s._dirtyElements;f=f._nodeMap;let A=Vt(),D=new Map;var z=d;let ie=z.size;for(var xe=x,Re=xe.size;0<ie||0<Re;){if(0<ie){s._dirtyLeaves=new Set;for(let Ue of z)z=f.get(Ue),Nt(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&tt(z),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&Gc(s,z,D),d.add(Ue);if(z=s._dirtyLeaves,ie=z.size,0<ie){ya++;continue}}s._dirtyLeaves=new Set,s._dirtyElements=new Map;for(let Ue of xe)xe=Ue[0],Re=Ue[1],(xe==="root"||Re)&&(z=f.get(xe),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&Gc(s,z,D),x.set(xe,Re));z=s._dirtyLeaves,ie=z.size,xe=s._dirtyElements,Re=xe.size,ya++}s._dirtyLeaves=d,s._dirtyElements=x}function Vc(f,s){var d=f.type,x=s.get(d);if(x===void 0&&B(17,d),d=x.klass,f.type!==d.getType()&&B(18,d.name),d=d.importJSON(f),f=f.children,nt(d)&&Array.isArray(f))for(x=0;x<f.length;x++){let A=Vc(f[x],s);d.append(A)}return d}function ba(f,s){let d=Wn,x=Or,A=vn;Wn=f,Or=!0,vn=null;try{return s()}finally{Wn=d,Or=x,vn=A}}function li(f,s){let d=f._pendingEditorState,x=f._rootElement,A=f._headless||x===null;if(d!==null){var D=f._editorState,z=D._selection,ie=d._selection,xe=f._dirtyType!==0,Re=Wn,Ue=Or,Ze=vn,Ge=f._updating,Ie=f._observer,it=null;if(f._pendingEditorState=null,f._editorState=d,!A&&xe&&Ie!==null){vn=f,Wn=d,Or=!1,f._updating=!0;try{let pn=f._dirtyType,Tt=f._dirtyElements,or=f._dirtyLeaves;Ie.disconnect();var vt=pn,$t=Tt,Ut=or;er=No=Rn="",Ga=vt===2,Xr=null,hr=f,So=f._config,Jr=f._nodes,Pn=hr._listeners.mutation,Fn=$t,Bs=Ut,Qr=D._nodeMap,Oo=d._nodeMap,Oc=d._readOnly,Ws=new Map(f._keyToDOMMap);let Hr=new Map;Va=Hr,Ai("root",null),Va=Ws=So=Oo=Qr=Bs=Fn=Jr=hr=void 0,it=Hr}catch(pn){if(pn instanceof Error&&f._onError(pn),Qs)throw pn;Kc(f,null,x,d),Fe(f),f._dirtyType=2,Qs=!0,li(f,D),Qs=!1;return}finally{Ie.observe(x,is),f._updating=Ge,Wn=Re,Or=Ue,vn=Ze}}d._readOnly||(d._readOnly=!0);var $n=f._dirtyLeaves,Xn=f._dirtyElements,cs=f._normalizedNodes,Rr=f._updateTags,ko=f._deferred;xe&&(f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements=new Map,f._normalizedNodes=new Set,f._updateTags=new Set);var rl=f._decorators,Ca=f._pendingDecorators||rl,Cd=d._nodeMap,Zc;for(Zc in Ca)Cd.has(Zc)||(Ca===rl&&(Ca=Qo(f)),delete Ca[Zc]);var to=A?null:go(f._window);if(f._editable&&to!==null&&(xe||ie===null||ie.dirty)){vn=f,Wn=d;try{if(Ie!==null&&Ie.disconnect(),xe||ie===null||ie.dirty){let pn=f._blockCursorElement;pn!==null&&Tc(pn,f,x);e:{let Tt=to.anchorNode,or=to.focusNode,Hr=to.anchorOffset,di=to.focusOffset,Fr=document.activeElement;if(!(Rr.has("collaboration")&&Fr!==x||Fr!==null&&et(Fr)))if(Lt(ie)){var wa=ie.anchor,Ta=ie.focus,ci=wa.key,Th=Ta.key,wd=Yt(f,ci),Jc=Yt(f,Th),ol=wa.offset,Td=Ta.offset,Xc=ie.format,Qc=ie.style,eu=ie.isCollapsed(),us=wd,no=Jc,Kn=!1;if(wa.type==="text"){us=Rt(wd);let ir=wa.getNode();Kn=ir.getFormat()!==Xc||ir.getStyle()!==Qc}else Lt(z)&&z.anchor.type==="text"&&(Kn=!0);if(Ta.type==="text"&&(no=Rt(Jc)),us!==null&&no!==null){if(eu&&(z===null||Kn||Lt(z)&&(z.format!==Xc||z.style!==Qc))){var St=performance.now();sd=[Xc,Qc,ol,ci,St]}if(Hr===ol&&di===Td&&Tt===us&&or===no&&(to.type!=="Range"||!eu)&&(Fr!==null&&x.contains(Fr)||x.focus({preventScroll:!0}),wa.type!=="element"))break e;try{to.setBaseAndExtent(us,ol,no,Td)}catch{}if(!Rr.has("skip-scroll-into-view")&&ie.isCollapsed()&&x!==null&&x===document.activeElement){let ir=ie instanceof Pi&&ie.anchor.type==="element"?us.childNodes[ol]||null:0<to.rangeCount?to.getRangeAt(0):null;if(ir!==null){let yr;if(ir instanceof Text){let jr=document.createRange();jr.selectNode(ir),yr=jr.getBoundingClientRect()}else yr=ir.getBoundingClientRect();let Po=x.ownerDocument,Io=Po.defaultView;if(Io!==null)for(var{top:ui,bottom:Na}=yr,ds,il,rr=x;rr!==null;){let jr=rr===Po.body;if(jr)ds=0,il=Cn(f).innerHeight;else{let ll=rr.getBoundingClientRect();ds=ll.top,il=ll.bottom}let Wi=0;if(ui<ds?Wi=-(ds-ui):Na>il&&(Wi=Na-il),Wi!==0)if(jr)Io.scrollBy(0,Wi);else{let ll=rr.scrollTop;rr.scrollTop+=Wi;let nu=rr.scrollTop-ll;ui-=nu,Na-=nu}if(jr)break;rr=mn(rr)}}}Pc=!0}}else z!==null&&lt(f,Tt,or)&&to.removeAllRanges()}}e:{let pn=f._blockCursorElement;if(Lt(ie)&&ie.isCollapsed()&&ie.anchor.type==="element"&&x.contains(document.activeElement)){let Tt=ie.anchor,or=Tt.getNode(),Hr=Tt.offset,di=or.getChildrenSize(),Fr=!1,ir=null;if(Hr===di){let yr=or.getChildAtIndex(Hr-1);wc(yr)&&(Fr=!0)}else{let yr=or.getChildAtIndex(Hr);if(wc(yr)){let Po=yr.getPreviousSibling();(Po===null||wc(Po))&&(Fr=!0,ir=f.getElementByKey(yr.__key))}}if(Fr){let yr=f.getElementByKey(or.__key);if(pn===null){let Po=f._config.theme,Io=document.createElement("div");Io.contentEditable="false",Io.setAttribute("data-lexical-cursor","true");let jr=Po.blockCursor;if(jr!==void 0){if(typeof jr=="string"){let Wi=jr.split(" ");jr=Po.blockCursor=Wi}jr!==void 0&&Io.classList.add(...jr)}f._blockCursorElement=pn=Io}x.style.caretColor="transparent",ir===null?yr.appendChild(pn):yr.insertBefore(pn,ir);break e}}pn!==null&&Tc(pn,f,x)}Ie!==null&&Ie.observe(x,is)}finally{vn=Ze,Wn=Re}}if(it!==null){var tu=it;let pn=Array.from(f._listeners.mutation),Tt=pn.length;for(let or=0;or<Tt;or++){let[Hr,di]=pn[or],Fr=tu.get(di);Fr!==void 0&&Hr(Fr,{dirtyLeaves:$n,prevEditorState:D,updateTags:Rr})}}Lt(ie)||ie===null||z!==null&&z.is(ie)||f.dispatchCommand(e,void 0);var al=f._pendingDecorators;al!==null&&(f._decorators=al,f._pendingDecorators=null,as("decorator",f,!0,al));var Nd=ia(s||D),Mo=ia(d);if(Nd!==Mo&&as("textcontent",f,!0,Mo),as("update",f,!0,{dirtyElements:Xn,dirtyLeaves:$n,editorState:d,normalizedNodes:cs,prevEditorState:s||D,tags:Rr}),f._deferred=[],ko.length!==0){let pn=f._updating;f._updating=!0;try{for(let Tt=0;Tt<ko.length;Tt++)ko[Tt]()}finally{f._updating=pn}}var sl=f._updates;if(sl.length!==0){let pn=sl.shift();if(pn){let[Tt,or]=pn;bd(f,Tt,or)}}}}function as(f,s,d,...x){let A=s._updating;s._updating=d;try{let D=Array.from(s._listeners[f]);for(f=0;f<D.length;f++)D[f].apply(null,x)}finally{s._updating=A}}function pt(f,s,d){if(f._updating===!1||vn!==f){let D=!1;return f.update(()=>{D=pt(f,s,d)}),D}let x=Ee(f);for(let D=4;0<=D;D--)for(let z=0;z<x.length;z++){var A=x[z]._commands.get(s);if(A!==void 0&&(A=A[D],A!==void 0)){A=Array.from(A);let ie=A.length;for(let xe=0;xe<ie;xe++)if(A[xe](d,f)===!0)return!0}}return!1}function vd(f,s){let d=f._updates;for(s=s||!1;d.length!==0;){var x=d.shift();if(x){let[A,D]=x,z;D!==void 0&&(x=D.onUpdate,z=D.tag,D.skipTransforms&&(s=!0),x&&f._deferred.push(x),z&&f._updateTags.add(z)),A()}}return s}function bd(f,s,d){let x=f._updateTags;var A,D=A=!1;if(d!==void 0){var z=d.onUpdate;A=d.tag,A!=null&&x.add(A),A=d.skipTransforms||!1,D=d.discrete||!1}z&&f._deferred.push(z),d=f._editorState,z=f._pendingEditorState;let ie=!1;(z===null||z._readOnly)&&(z=f._pendingEditorState=new Ea(new Map((z||d)._nodeMap)),ie=!0),z._flushSync=D,D=Wn;let xe=Or,Re=vn,Ue=f._updating;Wn=z,Or=!1,f._updating=!0,vn=f;try{ie&&(f._headless?d._selection!=null&&(z._selection=d._selection.clone()):z._selection=wr(f));let Ze=f._compositionKey;s(),A=vd(f,A),Hc(z,f),f._dirtyType!==0&&(A?wh(z,f):el(z,f),vd(f),hh(d,z,f._dirtyLeaves,f._dirtyElements)),Ze!==f._compositionKey&&(z._flushSync=!0);let Ge=z._selection;if(Lt(Ge)){let Ie=z._nodeMap,it=Ge.focus.key;Ie.get(Ge.anchor.key)!==void 0&&Ie.get(it)!==void 0||B(19)}else ii(Ge)&&Ge._nodes.size===0&&(z._selection=null)}catch(Ze){Ze instanceof Error&&f._onError(Ze),f._pendingEditorState=d,f._dirtyType=2,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),li(f);return}finally{Wn=D,Or=xe,vn=Re,f._updating=Ue,ya=0}f._dirtyType!==0||xa(z,f)?z._flushSync?(z._flushSync=!1,li(f)):ie&&Qe(()=>{li(f)}):(z._flushSync=!1,ie&&(x.clear(),f._deferred=[],f._pendingEditorState=null))}function Lr(f,s,d){f._updating?f._updates.push([s,d]):bd(f,s,d)}class tl extends ua{constructor(s){super(s)}decorate(){B(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function on(f){return f instanceof tl}class Do extends ua{constructor(s){super(s),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let s=this.getFormat();return Pe[s]||""}getIndent(){return this.getLatest().__indent}getChildren(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getChildrenKeys(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d.__key),d=d.getNextSibling();return s}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let s=bn()._dirtyElements;return s!==null&&s.has(this.__key)}isLastChild(){let s=this.getLatest(),d=this.getParentOrThrow().getLastChild();return d!==null&&d.is(s)}getAllTextNodes(){let s=[],d=this.getFirstChild();for(;d!==null;){if(Nt(d)&&s.push(d),nt(d)){let x=d.getAllTextNodes();s.push(...x)}d=d.getNextSibling()}return s}getFirstDescendant(){let s=this.getFirstChild();for(;s!==null;){if(nt(s)){let d=s.getFirstChild();if(d!==null){s=d;continue}}break}return s}getLastDescendant(){let s=this.getLastChild();for(;s!==null;){if(nt(s)){let d=s.getLastChild();if(d!==null){s=d;continue}}break}return s}getDescendantByIndex(s){let d=this.getChildren(),x=d.length;return s>=x?(s=d[x-1],nt(s)&&s.getLastDescendant()||s||null):(s=d[s],nt(s)&&s.getFirstDescendant()||s||null)}getFirstChild(){let s=this.getLatest().__first;return s===null?null:sn(s)}getFirstChildOrThrow(){let s=this.getFirstChild();return s===null&&B(45,this.__key),s}getLastChild(){let s=this.getLatest().__last;return s===null?null:sn(s)}getLastChildOrThrow(){let s=this.getLastChild();return s===null&&B(96,this.__key),s}getChildAtIndex(s){var d=this.getChildrenSize();let x;if(s<d/2){for(x=this.getFirstChild(),d=0;x!==null&&d<=s;){if(d===s)return x;x=x.getNextSibling(),d++}return null}for(x=this.getLastChild(),--d;x!==null&&d>=s;){if(d===s)return x;x=x.getPreviousSibling(),d--}return null}getTextContent(){let s="",d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContent(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=`
264
-
265
- `)}return s}getTextContentSize(){let s=0,d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContentSize(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=2)}return s}getDirection(){return this.getLatest().__dir}hasFormat(s){return s!==""?(s=Me[s],(this.getFormat()&s)!==0):!1}select(s,d){nr();let x=hn(),A=s,D=d;var z=this.getChildrenSize();if(!this.canBeEmpty()){if(s===0&&d===0){if(s=this.getFirstChild(),Nt(s)||nt(s))return s.select(0,0)}else if(!(s!==void 0&&s!==z||d!==void 0&&d!==z)&&(s=this.getLastChild(),Nt(s)||nt(s)))return s.select()}if(A===void 0&&(A=z),D===void 0&&(D=z),z=this.__key,Lt(x))x.anchor.set(z,A,"element"),x.focus.set(z,D,"element"),x.dirty=!0;else return mo(z,A,z,D,"element","element");return x}selectStart(){let s=this.getFirstDescendant();return s?s.selectStart():this.select()}selectEnd(){let s=this.getLastDescendant();return s?s.selectEnd():this.select()}clear(){let s=this.getWritable();return this.getChildren().forEach(d=>d.remove()),s}append(...s){return this.splice(this.getChildrenSize(),0,s)}setDirection(s){let d=this.getWritable();return d.__dir=s,d}setFormat(s){return this.getWritable().__format=s!==""?Me[s]:0,this}setIndent(s){return this.getWritable().__indent=s,this}splice(s,d,x){let A=x.length,D=this.getChildrenSize(),z=this.getWritable(),ie=z.__key;var xe=[],Re=[];let Ue=this.getChildAtIndex(s+d),Ze=null,Ge=D-d+A;if(s!==0)if(s===D)Ze=this.getLastChild();else{var Ie=this.getChildAtIndex(s);Ie!==null&&(Ze=Ie.getPreviousSibling())}if(0<d){var it=Ze===null?this.getFirstChild():Ze.getNextSibling();for(Ie=0;Ie<d;Ie++){it===null&&B(100);var vt=it.getNextSibling(),$t=it.__key;it=it.getWritable(),yt(it),Re.push($t),it=vt}}for(Ie=Ze,vt=0;vt<A;vt++){$t=x[vt],Ie!==null&&$t.is(Ie)&&(Ze=Ie=Ie.getPreviousSibling()),it=$t.getWritable(),it.__parent===ie&&Ge--,yt(it);let Ut=$t.__key;Ie===null?(z.__first=Ut,it.__prev=null):(Ie=Ie.getWritable(),Ie.__next=Ut,it.__prev=Ie.__key),$t.__key===ie&&B(76),it.__parent=ie,xe.push(Ut),Ie=$t}if(s+d===D?Ie!==null&&(Ie.getWritable().__next=null,z.__last=Ie.__key):Ue!==null&&(s=Ue.getWritable(),Ie!==null?(d=Ie.getWritable(),s.__prev=Ie.__key,d.__next=Ue.__key):s.__prev=null),z.__size=Ge,Re.length&&(s=hn(),Lt(s))){Re=new Set(Re),xe=new Set(xe);let{anchor:Ut,focus:$n}=s;_a(Ut,Re,xe)&&ma(Ut,Ut.getNode(),this,Ze,Ue),_a($n,Re,xe)&&ma($n,$n.getNode(),this,Ze,Ue),Ge!==0||this.canBeEmpty()||Ir(this)||this.remove()}return z}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function nt(f){return f instanceof Do}function _a(f,s,d){for(f=f.getNode();f;){let x=f.__key;if(s.has(x)&&!d.has(x))return!0;f=f.getParent()}return!1}class ji extends Do{static getType(){return"root"}static clone(){return new ji}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){let s=this.__cachedText;return!va()&&bn()._dirtyType!==0||s===null?super.getTextContent():s}remove(){B(52)}replace(){B(53)}insertBefore(){B(54)}insertAfter(){B(55)}updateDOM(){return!1}append(...s){for(let d=0;d<s.length;d++){let x=s[d];nt(x)||on(x)||B(56)}return super.append(...s)}static importJSON(s){let d=Zn();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Ar(f){return f instanceof ji}function xa(f,s){if(s=s.getEditorState()._selection,f=f._selection,f!==null){if(f.dirty||!f.is(s))return!0}else if(s!==null)return!0;return!1}function Bi(){return new Ea(new Map([["root",new ji]]))}function nl(f){let s=f.exportJSON();var d=f.constructor;s.type!==d.getType()&&B(130,d.name);let x=s.children;if(nt(f))for(Array.isArray(x)||B(59,d.name),f=f.getChildren(),d=0;d<f.length;d++){let A=nl(f[d]);x.push(A)}return s}class Ea{constructor(s,d){this._nodeMap=s,this._selection=d||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(s){return ba(this,s)}clone(s){return s=new Ea(this._nodeMap,s===void 0?this._selection:s),s._readOnly=!0,s}toJSON(){return ba(this,()=>({root:nl(Zn())}))}}class vo extends Do{static getType(){return"paragraph"}static clone(s){return new vo(s.__key)}createDOM(s){let d=document.createElement("p");return s=xt(s.theme,"paragraph"),s!==void 0&&d.classList.add(...s),d}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:ss,priority:0})}}exportDOM(s){if({element:s}=super.exportDOM(s),s&&ti(s)){this.isEmpty()&&s.append(document.createElement("br"));var d=this.getFormatType();s.style.textAlign=d,(d=this.getDirection())&&(s.dir=d),d=this.getIndent(),0<d&&(s.style.textIndent=`${20*d}px`)}return{element:s}}static importJSON(s){let d=bo();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(s,d){s=bo();let x=this.getDirection();return s.setDirection(x),this.insertAfter(s,d),s}collapseAtStart(){let s=this.getChildren();if(s.length===0||Nt(s[0])&&s[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ss(f){let s=bo();return f.style&&(s.setFormat(f.style.textAlign),f=parseInt(f.style.textIndent,10)/20,0<f&&s.setIndent(f)),{node:s}}function bo(){return ei(new vo)}function Kc(f,s,d,x){let A=f._keyToDOMMap;A.clear(),f._editorState=Bi(),f._pendingEditorState=x,f._compositionKey=null,f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),f._normalizedNodes=new Set,f._updateTags=new Set,f._updates=[],f._blockCursorElement=null,x=f._observer,x!==null&&(x.disconnect(),f._observer=null),s!==null&&(s.textContent=""),d!==null&&(d.textContent="",A.set("root",d))}function _d(f,s){let d=new Map,x=new Set,A=D=>{Object.keys(D).forEach(z=>{let ie=d.get(z);ie===void 0&&(ie=[],d.set(z,ie)),ie.push(D[z])})};return f.forEach(D=>{D=D.klass.importDOM!=null?D.klass.importDOM.bind(D.klass):null,D==null||x.has(D)||(x.add(D),D=D(),D!==null&&A(D))}),s&&A(s),d}class xd{constructor(s,d,x,A,D,z,ie){this._parentEditor=d,this._rootElement=null,this._editorState=s,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=A,this._nodes=x,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ae(),this._onError=D,this._htmlConversions=z,this._editable=ie,this._headless=d!==null&&d._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(s){let d=this._listeners.update;return d.add(s),()=>{d.delete(s)}}registerEditableListener(s){let d=this._listeners.editable;return d.add(s),()=>{d.delete(s)}}registerDecoratorListener(s){let d=this._listeners.decorator;return d.add(s),()=>{d.delete(s)}}registerTextContentListener(s){let d=this._listeners.textcontent;return d.add(s),()=>{d.delete(s)}}registerRootListener(s){let d=this._listeners.root;return s(this._rootElement,null),d.add(s),()=>{s(null,this._rootElement),d.delete(s)}}registerCommand(s,d,x){x===void 0&&B(35);let A=this._commands;A.has(s)||A.set(s,[new Set,new Set,new Set,new Set,new Set]);let D=A.get(s);D===void 0&&B(36,String(s));let z=D[x];return z.add(d),()=>{z.delete(d),D.every(ie=>ie.size===0)&&A.delete(s)}}registerMutationListener(s,d){this._nodes.get(s.getType())===void 0&&B(37,s.name);let x=this._listeners.mutation;return x.set(d,s),()=>{x.delete(d)}}registerNodeTransformToKlass(s,d){var x=s.getType();return x=this._nodes.get(x),x===void 0&&B(37,s.name),x.transforms.add(d),x}registerNodeTransform(s,d){var x=this.registerNodeTransformToKlass(s,d);let A=[x];return x=x.replaceWithKlass,x!=null&&(x=this.registerNodeTransformToKlass(x,d),A.push(x)),Sr(this,s.getType()),()=>{A.forEach(D=>D.transforms.delete(d))}}hasNode(s){return this._nodes.has(s.getType())}hasNodes(s){return s.every(this.hasNode.bind(this))}dispatchCommand(s,d){return pt(this,s,d)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(s){let d=this._rootElement;if(s!==d){let z=xt(this._config.theme,"root");var x=this._pendingEditorState||this._editorState;if(this._rootElement=s,Kc(this,d,s,x),d!==null){if(!this._config.disableEvents){qa!==0&&(qa--,qa===0&&d.ownerDocument.removeEventListener("selectionchange",hd));var A=d.__lexicalEditor;if(A!=null){if(A._parentEditor!==null){var D=Ee(A);D=D[D.length-1]._key,ca.get(D)===A&&ca.delete(D)}else ca.delete(A._key);d.__lexicalEditor=null}for(A=fd(d),D=0;D<A.length;D++)A[D]();d.__lexicalEventHandles=[]}z!=null&&d.classList.remove(...z)}s!==null?(x=(x=s.ownerDocument)&&x.defaultView||null,A=s.style,A.userSelect="text",A.whiteSpace="pre-wrap",A.wordBreak="break-word",s.setAttribute("data-lexical-editor","true"),this._window=x,this._dirtyType=2,Fe(this),this._updateTags.add("history-merge"),li(this),this._config.disableEvents||xh(s,this),z!=null&&s.classList.add(...z)):(this._editorState=x,this._window=this._pendingEditorState=null),as("root",this,!1,s,d)}}getElementByKey(s){return this._keyToDOMMap.get(s)||null}getEditorState(){return this._editorState}setEditorState(s,d){s.isEmpty()&&B(38),De(this);let x=this._pendingEditorState,A=this._updateTags;d=d!==void 0?d.tag:null,x===null||x.isEmpty()||(d!=null&&A.add(d),li(this)),this._pendingEditorState=s,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,d!=null&&A.add(d),li(this)}parseEditorState(s,d){s=typeof s=="string"?JSON.parse(s):s;let x=Bi(),A=Wn,D=Or,z=vn,ie=this._dirtyElements,xe=this._dirtyLeaves,Re=this._cloneNotNeeded,Ue=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Wn=x,Or=!1,vn=this;try{Vc(s.root,this._nodes),d&&d(),x._readOnly=!0}catch(Ze){Ze instanceof Error&&this._onError(Ze)}finally{this._dirtyElements=ie,this._dirtyLeaves=xe,this._cloneNotNeeded=Re,this._dirtyType=Ue,Wn=A,Or=D,vn=z}return x}update(s,d){Lr(this,s,d)}focus(s,d={}){let x=this._rootElement;x!==null&&(x.setAttribute("autocapitalize","off"),Lr(this,()=>{let A=hn(),D=Zn();A!==null?A.dirty=!0:D.getChildrenSize()!==0&&(d.defaultSelection==="rootStart"?D.selectStart():D.selectEnd())},{onUpdate:()=>{x.removeAttribute("autocapitalize"),s&&s()},tag:"focus"}),this._pendingEditorState===null&&x.removeAttribute("autocapitalize"))}blur(){var s=this._rootElement;s!==null&&s.blur(),s=go(this._window),s!==null&&s.removeAllRanges()}isEditable(){return this._editable}setEditable(s){this._editable!==s&&(this._editable=s,as("editable",this,!0,s))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Uc extends Do{constructor(s,d){super(d),this.__colSpan=s,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(s){return this.getWritable().__colSpan=s,this}getRowSpan(){return this.__rowSpan}setRowSpan(s){return this.getWritable().__rowSpan=s,this}}function zr(f){return f instanceof Uc}class Yc extends Do{}function qc(f){return f instanceof Yc}class Ed extends Do{}function ls(f){return f instanceof Ed}return Ke.$INTERNAL_isPointSelection=Wr,Ke.$addUpdateTag=function(f){nr(),bn()._updateTags.add(f)},Ke.$applyNodeReplacement=ei,Ke.$copyNode=sa,Ke.$createLineBreakNode=$i,Ke.$createNodeSelection=yo,Ke.$createParagraphNode=bo,Ke.$createRangeSelection=function(){let f=new tr("root",0,"element"),s=new tr("root",0,"element");return new Pi(f,s,0,"")},Ke.$createTabNode=Ys,Ke.$createTextNode=jn,Ke.$getAdjacentNode=At,Ke.$getNearestNodeFromDOMNode=Nr,Ke.$getNearestRootOrShadowRoot=Jn,Ke.$getNodeByKey=sn,Ke.$getPreviousSelection=ai,Ke.$getRoot=Zn,Ke.$getSelection=hn,Ke.$getTextContent=function(){let f=hn();return f===null?"":f.getTextContent()},Ke.$hasAncestor=Cr,Ke.$hasUpdateTag=function(f){return bn()._updateTags.has(f)},Ke.$insertNodes=function(f){let s=hn()||ai();s===null&&(s=Zn().selectEnd()),s.insertNodes(f)},Ke.$isBlockElementNode=function(f){return nt(f)&&!f.isInline()},Ke.$isDecoratorNode=on,Ke.$isElementNode=nt,Ke.$isInlineElementOrDecoratorNode=function(f){return nt(f)&&f.isInline()||on(f)&&f.isInline()},Ke.$isLeafNode=function(f){return Nt(f)||Di(f)||on(f)},Ke.$isLineBreakNode=Di,Ke.$isNodeSelection=ii,Ke.$isParagraphNode=function(f){return f instanceof vo},Ke.$isRangeSelection=Lt,Ke.$isRootNode=Ar,Ke.$isRootOrShadowRoot=Ir,Ke.$isTabNode=Bc,Ke.$isTextNode=Nt,Ke.$nodesOfType=function(f){var s=eo();let d=s._readOnly,x=f.getType();s=s._nodeMap;let A=[];for(let[,D]of s)D instanceof f&&D.__type===x&&(d||D.isAttached())&&A.push(D);return A},Ke.$normalizeSelection__EXPERIMENTAL=ut,Ke.$parseSerializedNode=function(f){return Vc(f,bn()._nodes)},Ke.$selectAll=function(){var f=Zn();f=f.select(0,f.getChildrenSize()),Er(ut(f))},Ke.$setCompositionKey=Dt,Ke.$setSelection=Er,Ke.$splitNode=function(f,s){let d=f.getChildAtIndex(s);d==null&&(d=f),Ir(f)&&B(102);let x=z=>{const ie=z.getParentOrThrow(),xe=Ir(ie),Re=z!==d||xe?sa(z):z;if(xe)return z.insertAfter(Re),[z,Re,Re];const[Ue,Ze,Ge]=x(ie);return z=z.getNextSiblings(),Ge.append(Re,...z),[Ue,Ze,Re]},[A,D]=x(d);return[A,D]},Ke.BLUR_COMMAND=ee,Ke.CAN_REDO_COMMAND={},Ke.CAN_UNDO_COMMAND={},Ke.CLEAR_EDITOR_COMMAND={},Ke.CLEAR_HISTORY_COMMAND={},Ke.CLICK_COMMAND=t,Ke.COMMAND_PRIORITY_CRITICAL=4,Ke.COMMAND_PRIORITY_EDITOR=0,Ke.COMMAND_PRIORITY_HIGH=3,Ke.COMMAND_PRIORITY_LOW=1,Ke.COMMAND_PRIORITY_NORMAL=2,Ke.CONTROLLED_TEXT_INSERTION_COMMAND=i,Ke.COPY_COMMAND=ne,Ke.CUT_COMMAND=fe,Ke.DELETE_CHARACTER_COMMAND=n,Ke.DELETE_LINE_COMMAND=p,Ke.DELETE_WORD_COMMAND=u,Ke.DEPRECATED_$computeGridMap=$o,Ke.DEPRECATED_$createGridSelection=function(){let f=new tr("root",0,"element"),s=new tr("root",0,"element");return new Mi("root",f,s)},Ke.DEPRECATED_$getGridCellNodeRect=Wc,Ke.DEPRECATED_$getNodeTriplet=Js,Ke.DEPRECATED_$isGridCellNode=zr,Ke.DEPRECATED_$isGridNode=qc,Ke.DEPRECATED_$isGridRowNode=ls,Ke.DEPRECATED_$isGridSelection=gd,Ke.DEPRECATED_GridCellNode=Uc,Ke.DEPRECATED_GridNode=Yc,Ke.DEPRECATED_GridRowNode=Ed,Ke.DRAGEND_COMMAND=pe,Ke.DRAGOVER_COMMAND=de,Ke.DRAGSTART_COMMAND=Q,Ke.DROP_COMMAND=K,Ke.DecoratorNode=tl,Ke.ElementNode=Do,Ke.FOCUS_COMMAND=j,Ke.FORMAT_ELEMENT_COMMAND={},Ke.FORMAT_TEXT_COMMAND=m,Ke.INDENT_CONTENT_COMMAND={},Ke.INSERT_LINE_BREAK_COMMAND=r,Ke.INSERT_PARAGRAPH_COMMAND=o,Ke.INSERT_TAB_COMMAND={},Ke.KEY_ARROW_DOWN_COMMAND=k,Ke.KEY_ARROW_LEFT_COMMAND=T,Ke.KEY_ARROW_RIGHT_COMMAND=y,Ke.KEY_ARROW_UP_COMMAND=R,Ke.KEY_BACKSPACE_COMMAND=Y,Ke.KEY_DELETE_COMMAND=oe,Ke.KEY_DOWN_COMMAND=_,Ke.KEY_ENTER_COMMAND=P,Ke.KEY_ESCAPE_COMMAND=X,Ke.KEY_MODIFIER_COMMAND=re,Ke.KEY_SPACE_COMMAND=M,Ke.KEY_TAB_COMMAND=Z,Ke.LineBreakNode=da,Ke.MOVE_TO_END=v,Ke.MOVE_TO_START=O,Ke.OUTDENT_CONTENT_COMMAND={},Ke.PASTE_COMMAND=a,Ke.ParagraphNode=vo,Ke.REDO_COMMAND=C,Ke.REMOVE_TEXT_COMMAND=l,Ke.RootNode=ji,Ke.SELECTION_CHANGE_COMMAND=e,Ke.SELECT_ALL_COMMAND=U,Ke.TabNode=Ro,Ke.TextNode=ni,Ke.UNDO_COMMAND=b,Ke.createCommand=function(){return{}},Ke.createEditor=function(f){var s=f||{},d=vn,x=s.theme||{};let A=f===void 0?d:s.parentEditor||null,D=s.disableEvents||!1,z=Bi(),ie=s.namespace||(A!==null?A._config.namespace:ae()),xe=s.editorState,Re=[ji,ni,da,Ro,vo,...s.nodes||[]],{onError:Ue,html:Ze}=s;if(s=s.editable!==void 0?s.editable:!0,f===void 0&&d!==null)f=d._nodes;else for(f=new Map,d=0;d<Re.length;d++){let Ie=Re[d],it=null;var Ge=null;typeof Ie!="function"&&(Ge=Ie,Ie=Ge.replace,it=Ge.with,Ge=Ge.withKlass||null);let vt=Ie.getType(),$t=Ie.transform(),Ut=new Set;$t!==null&&Ut.add($t),f.set(vt,{exportDOM:Ze&&Ze.export?Ze.export.get(Ie):void 0,klass:Ie,replace:it,replaceWithKlass:Ge,transforms:Ut})}return x=new xd(z,A,f,{disableEvents:D,namespace:ie,theme:x},Ue||console.error,_d(f,Ze?Ze.import:void 0),s),xe!==void 0&&(x._pendingEditorState=xe,x._dirtyType=2),x},Ke.getNearestEditorFromDOMNode=wt,Ke.isHTMLAnchorElement=function(f){return ti(f)&&f.tagName==="A"},Ke.isHTMLElement=ti,Ke.isSelectionCapturedInDecoratorInput=et,Ke.isSelectionWithinEditor=lt,Ke}var Fb,jb;function Xt(){return jb||(jb=1,Fb=process.env.NODE_ENV==="development"?J9():X9()),Fb}var Bb;function Q9(){if(Bb)return fp;Bb=1;var e=dr(),t=Xt(),n=H;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;const i={tag:"history-merge"};function a({initialConfig:u,children:p}){const m=n.useMemo(()=>{const{theme:b,namespace:C,editor__DEPRECATED:_,nodes:y,onError:v,editorState:T,html:O}=u,R=e.createLexicalComposerContext(null,b);let k=_||null;if(k===null){const P=t.createEditor({editable:u.editable,html:O,namespace:C,nodes:y,onError:M=>v(M,P),theme:b});l(P,T),k=P}return[k,R]},[]);return o(()=>{const b=u.editable,[C]=m;C.setEditable(b!==void 0?b:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:m},p)}function l(u,p){if(p!==null){if(p===void 0)u.update(()=>{const m=t.$getRoot();if(m.isEmpty()){const b=t.$createParagraphNode();m.append(b);const C=r?document.activeElement:null;(t.$getSelection()!==null||C!==null&&C===u.getRootElement())&&b.select()}},i);else if(p!==null)switch(typeof p){case"string":{const m=u.parseEditorState(p);u.setEditorState(m,i);break}case"object":{u.setEditorState(p,i);break}case"function":{u.update(()=>{t.$getRoot().isEmpty()&&p(u)},i);break}}}}return fp.LexicalComposer=a,fp}var hp={},Wb;function e7(){if(Wb)return hp;Wb=1;var e=dr(),t=Xt(),n=H;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};function a(l,u){if(u!==null){if(u===void 0)l.update(()=>{var p=t.$getRoot();if(p.isEmpty()){let m=t.$createParagraphNode();p.append(m),p=r?document.activeElement:null,(t.$getSelection()!==null||p!==null&&p===l.getRootElement())&&m.select()}},i);else if(u!==null)switch(typeof u){case"string":let p=l.parseEditorState(u);l.setEditorState(p,i);break;case"object":l.setEditorState(u,i);break;case"function":l.update(()=>{t.$getRoot().isEmpty()&&u(l)},i)}}}return hp.LexicalComposer=function({initialConfig:l,children:u}){let p=n.useMemo(()=>{const{theme:m,namespace:b,editor__DEPRECATED:C,nodes:_,onError:y,editorState:v,html:T}=l,O=e.createLexicalComposerContext(null,m);let R=C||null;if(R===null){const k=t.createEditor({editable:l.editable,html:T,namespace:b,nodes:_,onError:P=>y(P,k),theme:m});a(k,v),R=k}return[R,O]},[]);return o(()=>{let m=l.editable,[b]=p;b.setEditable(m!==void 0?m:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:p},u)},hp}process.env.NODE_ENV==="development"?Q9():e7();var pp={},gp,zb;function t7(){if(zb)return gp;zb=1;var e=dr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(a){const[l]=e.useLexicalComposerContext(),u=t.useMemo(()=>a(l),[l,a]),p=t.useRef(u.initialValueFn()),[m,b]=t.useState(p.current);return n(()=>{const{initialValueFn:C,subscribe:_}=u,y=C();return p.current!==y&&(p.current=y,b(y)),_(v=>{p.current=v,b(v)})},[u,a]),m}function o(a){return{initialValueFn:()=>a.isEditable(),subscribe:l=>a.registerEditableListener(l)}}function i(){return r(o)}return gp=i,gp}var mp,Hb;function n7(){if(Hb)return mp;Hb=1;var e=dr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(i){let[a]=e.useLexicalComposerContext(),l=t.useMemo(()=>i(a),[a,i]),u=t.useRef(l.initialValueFn()),[p,m]=t.useState(u.current);return n(()=>{let{initialValueFn:b,subscribe:C}=l,_=b();return u.current!==_&&(u.current=_,m(_)),C(y=>{u.current=y,m(y)})},[l,i]),p}function o(i){return{initialValueFn:()=>i.isEditable(),subscribe:a=>i.registerEditableListener(a)}}return mp=function(){return r(o)},mp}var Gb,Vb;function AN(){return Vb||(Vb=1,Gb=process.env.NODE_ENV==="development"?t7():n7()),Gb}var Ui={},Kb;function r7(){if(Kb)return Ui;Kb=1;var e=Xt();function t(u,p){let m=u.getFirstChild(),b=0;e:for(;m!==null;){if(e.$isElementNode(m)){const y=m.getFirstChild();if(y!==null){m=y;continue}}else if(e.$isTextNode(m)){const y=m.getTextContentSize();if(b+y>p)return{node:m,offset:p-b};b+=y}const C=m.getNextSibling();if(C!==null){m=C;continue}let _=m.getParent();for(;_!==null;){const y=_.getNextSibling();if(y!==null){m=y;continue e}_=_.getParent()}break}return null}function n(u,p=!0){if(u)return!1;let m=o();return p&&(m=m.trim()),m===""}function r(u,p){return()=>n(u,p)}function o(){return e.$getRoot().getTextContent()}function i(u){if(!n(u,!1))return!1;const p=e.$getRoot().getChildren(),m=p.length;if(m>1)return!1;for(let b=0;b<m;b++){const C=p[b];if(e.$isDecoratorNode(C))return!1;if(e.$isElementNode(C)){if(!e.$isParagraphNode(C)||C.__indent!==0)return!1;const _=C.getChildren(),y=_.length;for(let v=0;v<y;v++){const T=_[b];if(!e.$isTextNode(T))return!1}}}return!0}function a(u){return()=>i(u)}function l(u,p,m,b){const C=k=>k instanceof m,_=k=>{const P=e.$createTextNode(k.getTextContent());P.setFormat(k.getFormat()),k.replace(P)},y=k=>k.getLatest().__mode,v=k=>{if(!k.isSimpleText())return;const P=k.getPreviousSibling();let M=k.getTextContent(),Y=k,X;if(e.$isTextNode(P)){const oe=P.getTextContent(),Z=oe+M,K=p(Z);if(C(P))if(K===null||y(P)!==0){_(P);return}else{const Q=K.end-oe.length;if(Q>0){const de=M.slice(0,Q),pe=oe+de;if(P.select(),P.setTextContent(pe),Q===M.length)k.remove();else{const ne=M.slice(Q);k.setTextContent(ne)}return}}else if(K===null||K.start<oe.length)return}for(;;){X=p(M);let oe=X===null?"":M.slice(X.end);if(M=oe,oe===""){const Q=Y.getNextSibling();if(e.$isTextNode(Q)){oe=Y.getTextContent()+Q.getTextContent();const de=p(oe);if(de===null){C(Q)?_(Q):Q.markDirty();return}else if(de.start!==0)return}}else{const Q=p(oe);if(Q!==null&&Q.start===0)return}if(X===null)return;if(X.start===0&&e.$isTextNode(P)&&P.isTextEntity())continue;let Z;X.start===0?[Z,Y]=Y.splitText(X.end):[,Z,Y]=Y.splitText(X.start,X.end);const K=b(Z);if(K.setFormat(Z.getFormat()),Z.replace(K),Y==null)return}},T=k=>{const P=k.getTextContent(),M=p(P);if(M===null||M.start!==0){_(k);return}if(P.length>M.end){k.splitText(M.end);return}const Y=k.getPreviousSibling();e.$isTextNode(Y)&&Y.isTextEntity()&&(_(Y),_(k));const X=k.getNextSibling();e.$isTextNode(X)&&X.isTextEntity()&&(_(X),C(k)&&_(k))},O=u.registerNodeTransform(e.TextNode,v),R=u.registerNodeTransform(m,T);return[O,R]}return Ui.$canShowPlaceholder=i,Ui.$canShowPlaceholderCurry=a,Ui.$findTextIntersectionFromCharacters=t,Ui.$isRootTextContentEmpty=n,Ui.$isRootTextContentEmptyCurry=r,Ui.$rootTextContent=o,Ui.registerLexicalTextEntity=l,Ui}var Yi={},Ub;function o7(){if(Ub)return Yi;Ub=1;var e=Xt();function t(o,i=!0){return o?!1:(o=n(),i&&(o=o.trim()),o==="")}function n(){return e.$getRoot().getTextContent()}function r(o){if(!t(o,!1))return!1;o=e.$getRoot().getChildren();let i=o.length;if(1<i)return!1;for(let l=0;l<i;l++){var a=o[l];if(e.$isDecoratorNode(a))return!1;if(e.$isElementNode(a)){if(!e.$isParagraphNode(a)||a.__indent!==0)return!1;a=a.getChildren();let u=a.length;for(let p=0;p<u;p++)if(!e.$isTextNode(a[l]))return!1}}return!0}return Yi.$canShowPlaceholder=r,Yi.$canShowPlaceholderCurry=function(o){return()=>r(o)},Yi.$findTextIntersectionFromCharacters=function(o,i){var a=o.getFirstChild();o=0;e:for(;a!==null;){if(e.$isElementNode(a)){var l=a.getFirstChild();if(l!==null){a=l;continue}}else if(e.$isTextNode(a)){if(l=a.getTextContentSize(),o+l>i)return{node:a,offset:i-o};o+=l}if(l=a.getNextSibling(),l!==null)a=l;else{for(a=a.getParent();a!==null;){if(l=a.getNextSibling(),l!==null){a=l;continue e}a=a.getParent()}break}}return null},Yi.$isRootTextContentEmpty=t,Yi.$isRootTextContentEmptyCurry=function(o,i){return()=>t(o,i)},Yi.$rootTextContent=n,Yi.registerLexicalTextEntity=function(o,i,a,l){let u=m=>{const b=e.$createTextNode(m.getTextContent());b.setFormat(m.getFormat()),m.replace(b)},p=o.registerNodeTransform(e.TextNode,m=>{if(m.isSimpleText()){var b=m.getPreviousSibling(),C=m.getTextContent(),_=m;if(e.$isTextNode(b)){var y=b.getTextContent(),v=i(y+C);if(b instanceof a){if(v===null||b.getLatest().__mode!==0){u(b);return}if(v=v.end-y.length,0<v){_=C.slice(0,v),_=y+_,b.select(),b.setTextContent(_),v===C.length?m.remove():(b=C.slice(v),m.setTextContent(b));return}}else if(v===null||v.start<y.length)return}for(;;){if(m=i(C),C=v=m===null?"":C.slice(m.end),v===""){if(y=_.getNextSibling(),e.$isTextNode(y)){if(v=_.getTextContent()+y.getTextContent(),v=i(v),v===null){y instanceof a?u(y):y.markDirty();break}else if(v.start!==0)break}}else if(y=i(v),y!==null&&y.start===0)break;if(m===null)break;if(m.start===0&&e.$isTextNode(b)&&b.isTextEntity())continue;let T;if(m.start===0?[T,_]=_.splitText(m.end):[,T,_]=_.splitText(m.start,m.end),m=l(T),m.setFormat(T.getFormat()),T.replace(m),_==null)break}}});return o=o.registerNodeTransform(a,m=>{var b=m.getTextContent();const C=i(b);C===null||C.start!==0?u(m):b.length>C.end?m.splitText(C.end):(b=m.getPreviousSibling(),e.$isTextNode(b)&&b.isTextEntity()&&(u(b),u(m)),b=m.getNextSibling(),e.$isTextNode(b)&&b.isTextEntity()&&(u(b),m instanceof a&&u(m)))}),[p,o]},Yi}var Yb,qb;function RN(){return qb||(qb=1,Yb=process.env.NODE_ENV==="development"?r7():o7()),Yb}var In={},ar={},Zb;function i7(){if(Zb)return ar;Zb=1;var e=Xt();const t=new Map;function n(U){let j=U;for(;j!=null;){if(j.nodeType===Node.TEXT_NODE)return j;j=j.firstChild}return null}function r(U){const j=U.parentNode;if(j==null)throw new Error("Should never happen");return[j,Array.from(j.childNodes).indexOf(U)]}function o(U,j,ee,re,B){const W=j.getKey(),J=re.getKey(),F=document.createRange();let w=U.getElementByKey(W),N=U.getElementByKey(J),I=ee,q=B;if(e.$isTextNode(j)&&(w=n(w)),e.$isTextNode(re)&&(N=n(N)),j===void 0||re===void 0||w===null||N===null)return null;w.nodeName==="BR"&&([w,I]=r(w)),N.nodeName==="BR"&&([N,q]=r(N));const ue=w.firstChild;w===N&&ue!=null&&ue.nodeName==="BR"&&I===0&&q===0&&(q=1);try{F.setStart(w,I),F.setEnd(N,q)}catch{return null}return F.collapsed&&(I!==q||W!==J)&&(F.setStart(N,q),F.setEnd(w,I)),F}function i(U,j){const ee=U.getRootElement();if(ee===null)return[];const re=ee.getBoundingClientRect(),B=getComputedStyle(ee),W=parseFloat(B.paddingLeft)+parseFloat(B.paddingRight),J=Array.from(j.getClientRects());let F=J.length;J.sort((N,I)=>{const q=N.top-I.top;return Math.abs(q)<=3?N.left-I.left:q});let w;for(let N=0;N<F;N++){const I=J[N],q=w&&w.top<=I.top&&w.top+w.height>I.top&&w.left+w.width>I.left,ue=I.width+W===re.width;if(q||ue){J.splice(N--,1),F--;continue}w=I}return J}function a(U){const j={},ee=U.split(";");for(const re of ee)if(re!==""){const[B,W]=re.split(/:([^]+)/);B&&W&&(j[B.trim()]=W.trim())}return j}function l(U){let j=t.get(U);return j===void 0&&(j=a(U),t.set(U,j)),Object.freeze(j),j}function u(U){let j="";for(const ee in U)ee&&(j+=`${ee}: ${U[ee]};`);return j}function p(U,j){return U.__first=j.__first,U.__last=j.__last,U.__size=j.__size,U.__format=j.__format,U.__indent=j.__indent,U.__dir=j.__dir,U}function m(U,j){return U.__format=j.__format,U.__style=j.__style,U.__mode=j.__mode,U.__detail=j.__detail,U}function b(U){const j=U.constructor.clone(U);return j.__parent=U.__parent,j.__next=U.__next,j.__prev=U.__prev,e.$isElementNode(U)&&e.$isElementNode(j)?p(j,U):e.$isTextNode(U)&&e.$isTextNode(j)?m(j,U):j}function C(U,j){if(j.isSelected()&&!j.isSegmented()&&!j.isToken()&&e.$INTERNAL_isPointSelection(U)){const ee=U.anchor.getNode(),re=U.focus.getNode(),B=j.is(ee),W=j.is(re);if(B||W){const J=U.isBackward(),[F,w]=U.getCharacterOffsets(),N=ee.is(re),I=j.is(J?re:ee),q=j.is(J?ee:re);let ue=0,he;if(N)ue=F>w?w:F,he=F>w?F:w;else if(I)ue=J?w:F,he=void 0;else if(q){const se=J?F:w;ue=0,he=se}return j.__text=j.__text.slice(ue,he),j}}return j}function _(U){return U.type==="text"?U.offset===U.getNode().getTextContentSize():U.offset===U.getNode().getChildrenSize()}function y(U,j,ee){let re=j.getNode(),B=ee;if(e.$isElementNode(re)){const W=re.getDescendantByIndex(j.offset);W!==null&&(re=W)}for(;B>0&&re!==null;){if(e.$isElementNode(re)){const N=re.getLastDescendant();N!==null&&(re=N)}let W=re.getPreviousSibling(),J=0;if(W===null){let N=re.getParentOrThrow(),I=N.getPreviousSibling();for(;I===null;){if(N=N.getParent(),N===null){W=null;break}I=N.getPreviousSibling()}N!==null&&(J=N.isInline()?0:2,W=I)}let F=re.getTextContent();F===""&&e.$isElementNode(re)&&!re.isInline()&&(F=`
266
-
267
- `);const w=F.length;if(!e.$isTextNode(re)||B>=w){const N=re.getParent();re.remove(),N!=null&&N.getChildrenSize()===0&&!e.$isRootNode(N)&&N.remove(),B-=w+J,re=W}else{const N=re.getKey(),I=U.getEditorState().read(()=>{const he=e.$getNodeByKey(N);return e.$isTextNode(he)&&he.isSimpleText()?he.getTextContent():null}),q=w-B,ue=F.slice(0,q);if(I!==null&&I!==F){const he=e.$getPreviousSelection();let se=re;if(re.isSimpleText())re.setTextContent(I);else{const Ce=e.$createTextNode(I);re.replace(Ce),se=Ce}if(e.$isRangeSelection(he)&&he.isCollapsed()){const Ce=he.anchor.offset;se.select(Ce,Ce)}}else if(re.isSimpleText()){const he=j.key===N;let se=j.offset;se<B&&(se=w);const Ce=he?se-B:0,Oe=he?se:q;if(he&&Ce===0){const[Be]=re.splitText(Ce,Oe);Be.remove()}else{const[,Be]=re.splitText(Ce,Oe);Be.remove()}}else{const he=e.$createTextNode(ue);re.replace(he)}B=0}}}function v(U){const j=U.getStyle(),ee=a(j);t.set(j,ee)}function T(U,j){const ee=l("getStyle"in U?U.getStyle():U.style),re=Object.entries(j).reduce((W,[J,F])=>(F===null?delete W[J]:W[J]=F,W),{...ee}),B=u(re);U.setStyle(B),t.set(B,re)}function O(U,j){const ee=U.getNodes(),re=ee.length;if(e.DEPRECATED_$isGridSelection(U)){const ce=e.$createRangeSelection(),le=ce.anchor,ve=ce.focus;for(let Me=0;Me<re;Me++){const Pe=ee[Me];e.DEPRECATED_$isGridCellNode(Pe)&&(le.set(Pe.getKey(),0,"element"),ve.set(Pe.getKey(),Pe.getChildrenSize(),"element"),O(e.$normalizeSelection__EXPERIMENTAL(ce),j))}e.$setSelection(U);return}const B=re-1;let W=ee[0],J=ee[B];if(U.isCollapsed()&&e.$isRangeSelection(U)){T(U,j);return}const F=U.anchor,w=U.focus,N=W.getTextContent().length,I=w.offset;let q=F.offset;const ue=F.isBefore(w);let he=ue?q:I,se=ue?I:q;const Ce=ue?F.type:w.type,Oe=ue?w.type:F.type,Be=ue?w.key:F.key;if(e.$isTextNode(W)&&he===N){const ce=W.getNextSibling();e.$isTextNode(ce)&&(q=0,he=0,W=ce)}if(ee.length===1){if(e.$isTextNode(W)){if(he=Ce==="element"?0:q>I?I:q,se=Oe==="element"?N:q>I?q:I,he===se)return;if(he===0&&se===N)T(W,j),W.select(he,se);else{const ce=W.splitText(he,se),le=he===0?ce[0]:ce[1];T(le,j),le.select(0,se-he)}}}else{if(e.$isTextNode(W)&&he<W.getTextContentSize()&&(he!==0&&(W=W.splitText(he)[1],he=0,F.set(W.getKey(),he,"text")),T(W,j)),e.$isTextNode(J)){const ce=J.getTextContent().length;J.__key!==Be&&se!==0&&(se=ce),se!==ce&&([J]=J.splitText(se)),se!==0&&T(J,j)}for(let ce=1;ce<B;ce++){const le=ee[ce],ve=le.getKey();e.$isTextNode(le)&&ve!==W.getKey()&&ve!==J.getKey()&&!le.isToken()&&T(le,j)}}}function R(U,j){if(U.anchor.key==="root"){const B=j(),W=e.$getRoot(),J=W.getFirstChild();J?J.replace(B,!0):W.append(B);return}const ee=U.getNodes(),re=fe(U.anchor.getNode(),ne);re&&ee.indexOf(re)===-1&&ee.push(re);for(let B=0;B<ee.length;B++){const W=ee[B];if(!ne(W))continue;const J=j();J.setFormat(W.getFormatType()),J.setIndent(W.getIndent()),W.replace(J,!0)}}function k(U){return U.getNode().isAttached()}function P(U){let j=U;for(;j!==null&&!e.$isRootOrShadowRoot(j);){const ee=j.getLatest(),re=j.getParent();ee.getChildrenSize()===0&&j.remove(!0),j=re}}function M(U,j,ee=null){const re=U.getNodes(),B=re.length,W=U.anchor;if(B===0||B===1&&W.type==="element"&&W.getNode().getChildrenSize()===0){const w=W.type==="text"?W.getNode().getParentOrThrow():W.getNode(),N=w.getChildren();let I=j();I.setFormat(w.getFormatType()),I.setIndent(w.getIndent()),N.forEach(q=>I.append(q)),ee&&(I=ee.append(I)),w.replace(I);return}let J=null,F=[];for(let w=0;w<B;w++){const N=re[w];e.$isRootOrShadowRoot(N)?(Y(U,F,F.length,j,ee),F=[],J=N):J===null||J!==null&&e.$hasAncestor(N,J)?F.push(N):(Y(U,F,F.length,j,ee),F=[N])}Y(U,F,F.length,j,ee)}function Y(U,j,ee,re,B=null){if(j.length===0)return;const W=j[0],J=new Map,F=[];let w=e.$isElementNode(W)?W:W.getParentOrThrow();w.isInline()&&(w=w.getParentOrThrow());let N=!1;for(;w!==null;){const se=w.getPreviousSibling();if(se!==null){w=se,N=!0;break}if(w=w.getParentOrThrow(),e.$isRootOrShadowRoot(w))break}const I=new Set;for(let se=0;se<ee;se++){const Ce=j[se];e.$isElementNode(Ce)&&Ce.getChildrenSize()===0&&I.add(Ce.getKey())}const q=new Set;for(let se=0;se<ee;se++){const Ce=j[se];let Oe=Ce.getParent();if(Oe!==null&&Oe.isInline()&&(Oe=Oe.getParent()),Oe!==null&&e.$isLeafNode(Ce)&&!q.has(Ce.getKey())){const Be=Oe.getKey();if(J.get(Be)===void 0){const ce=re();ce.setFormat(Oe.getFormatType()),ce.setIndent(Oe.getIndent()),F.push(ce),J.set(Be,ce),Oe.getChildren().forEach(le=>{ce.append(le),q.add(le.getKey()),e.$isElementNode(le)&&le.getChildrenKeys().forEach(ve=>q.add(ve))}),P(Oe)}}else if(I.has(Ce.getKey())){const Be=re();Be.setFormat(Ce.getFormatType()),Be.setIndent(Ce.getIndent()),F.push(Be),Ce.remove(!0)}}if(B!==null)for(let se=0;se<F.length;se++){const Ce=F[se];B.append(Ce)}let ue=null;if(e.$isRootOrShadowRoot(w))if(N)if(B!==null)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce)}else{const se=w.getFirstChild();if(e.$isElementNode(se)&&(w=se),se===null)if(B)w.append(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];w.append(Oe),ue=Oe}else if(B!==null)se.insertBefore(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];se.insertBefore(Oe),ue=Oe}}else if(B)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce),ue=Ce}const he=e.$getPreviousSelection();e.$isRangeSelection(he)&&k(he.anchor)&&k(he.focus)?e.$setSelection(he.clone()):ue!==null?ue.selectEnd():U.dirty=!0}function X(U,j){const ee=e.$getAdjacentNode(U.focus,j);return e.$isDecoratorNode(ee)&&!ee.isIsolated()||e.$isElementNode(ee)&&!ee.isInline()&&!ee.canBeEmpty()}function oe(U,j,ee,re){U.modify(j?"extend":"move",ee,re)}function Z(U){const j=U.anchor.getNode();return(e.$isRootNode(j)?j:j.getParentOrThrow()).getDirection()==="rtl"}function K(U,j,ee){const re=Z(U);oe(U,j,ee?!re:re,"character")}function Q(U){const j=U.anchor,ee=U.focus,re=j.getNode().getTopLevelElementOrThrow().getParentOrThrow();let B=re.getFirstDescendant(),W=re.getLastDescendant(),J="element",F="element",w=0;e.$isTextNode(B)?J="text":!e.$isElementNode(B)&&B!==null&&(B=B.getParentOrThrow()),e.$isTextNode(W)?(F="text",w=W.getTextContentSize()):!e.$isElementNode(W)&&W!==null&&(W=W.getParentOrThrow()),B&&W&&(j.set(B.getKey(),0,J),ee.set(W.getKey(),w,F))}function de(U,j,ee){const re=U.getStyle(),B=l(re);return B!==null&&B[j]||ee}function pe(U,j,ee=""){let re=null;const B=U.getNodes(),W=U.anchor,J=U.focus,F=U.isBackward(),w=F?J.offset:W.offset,N=F?J.getNode():W.getNode();if(U.isCollapsed()&&U.style!==""){const I=U.style,q=l(I);if(q!==null&&j in q)return q[j]}for(let I=0;I<B.length;I++){const q=B[I];if(!(I!==0&&w===0&&q.is(N))&&e.$isTextNode(q)){const ue=de(q,j,ee);if(re===null)re=ue;else if(re!==ue){re="";break}}}return re===null?ee:re}function ne(U){if(e.$isDecoratorNode(U)&&!U.isInline())return!0;if(!e.$isElementNode(U)||e.$isRootOrShadowRoot(U))return!1;const j=U.getFirstChild(),ee=j===null||e.$isLineBreakNode(j)||e.$isTextNode(j)||j.isInline();return!U.isInline()&&U.canBeEmpty()!==!1&&ee}function fe(U,j){let ee=U;for(;ee!==null&&ee.getParent()!==null&&!j(ee);)ee=ee.getParentOrThrow();return j(ee)?ee:null}return ar.$addNodeStyle=v,ar.$cloneWithProperties=b,ar.$getSelectionStyleValueForProperty=pe,ar.$isAtNodeEnd=_,ar.$isParentElementRTL=Z,ar.$moveCaretSelection=oe,ar.$moveCharacter=K,ar.$patchStyleText=O,ar.$selectAll=Q,ar.$setBlocksType=R,ar.$shouldOverrideDefaultCharacterSelection=X,ar.$sliceSelectedTextNodeContent=C,ar.$wrapNodes=M,ar.createDOMRange=o,ar.createRectsFromDOMRange=i,ar.getStyleObjectFromCSS=l,ar.trimTextContentFromAnchor=y,ar}var sr={},Jb;function a7(){if(Jb)return sr;Jb=1;var e=Xt();let t=new Map;function n(y){for(;y!=null;){if(y.nodeType===Node.TEXT_NODE)return y;y=y.firstChild}return null}function r(y){let v=y.parentNode;if(v==null)throw Error("Should never happen");return[v,Array.from(v.childNodes).indexOf(y)]}function o(y){let v={};y=y.split(";");for(let T of y)if(T!==""){let[O,R]=T.split(/:([^]+)/);O&&R&&(v[O.trim()]=R.trim())}return v}function i(y){let v=t.get(y);return v===void 0&&(v=o(y),t.set(y,v)),v}function a(y){let v="";for(let T in y)T&&(v+=`${T}: ${y[T]};`);return v}function l(y,v){var T=i("getStyle"in y?y.getStyle():y.style);v=Object.entries(v).reduce((O,[R,k])=>(k===null?delete O[R]:O[R]=k,O),{...T}),T=a(v),y.setStyle(T),t.set(T,v)}function u(y,v){var T=y.getNodes(),O=T.length;if(e.DEPRECATED_$isGridSelection(y)){for(var R=e.$createRangeSelection(),k=R.anchor,P=R.focus,M=0;M<O;M++){var Y=T[M];e.DEPRECATED_$isGridCellNode(Y)&&(k.set(Y.getKey(),0,"element"),P.set(Y.getKey(),Y.getChildrenSize(),"element"),u(e.$normalizeSelection__EXPERIMENTAL(R),v))}e.$setSelection(y)}else if(--O,R=T[0],k=T[O],y.isCollapsed()&&e.$isRangeSelection(y))l(y,v);else{M=y.anchor;var X=y.focus;Y=R.getTextContent().length;var oe=X.offset,Z=M.offset,K=M.isBefore(X);P=K?Z:oe,y=K?oe:Z;var Q=K?M.type:X.type,de=K?X.type:M.type;if(X=K?X.key:M.key,e.$isTextNode(R)&&P===Y&&(K=R.getNextSibling(),e.$isTextNode(K)&&(P=Z=0,R=K)),T.length===1)e.$isTextNode(R)&&(P=Q==="element"?0:Z>oe?oe:Z,y=de==="element"?Y:Z>oe?Z:oe,P!==y&&(P===0&&y===Y?(l(R,v),R.select(P,y)):(T=R.splitText(P,y),T=P===0?T[0]:T[1],l(T,v),T.select(0,y-P))));else for(e.$isTextNode(R)&&P<R.getTextContentSize()&&(P!==0&&(R=R.splitText(P)[1],P=0,M.set(R.getKey(),P,"text")),l(R,v)),e.$isTextNode(k)&&(P=k.getTextContent().length,k.__key!==X&&y!==0&&(y=P),y!==P&&([k]=k.splitText(y)),y!==0&&l(k,v)),y=1;y<O;y++)P=T[y],M=P.getKey(),e.$isTextNode(P)&&M!==R.getKey()&&M!==k.getKey()&&!P.isToken()&&l(P,v)}}function p(y){for(;y!==null&&!e.$isRootOrShadowRoot(y);){let v=y.getLatest(),T=y.getParent();v.getChildrenSize()===0&&y.remove(!0),y=T}}function m(y,v,T,O,R=null){if(v.length!==0){var k=v[0],P=new Map,M=[];k=e.$isElementNode(k)?k:k.getParentOrThrow(),k.isInline()&&(k=k.getParentOrThrow());for(var Y=!1;k!==null;){var X=k.getPreviousSibling();if(X!==null){k=X,Y=!0;break}if(k=k.getParentOrThrow(),e.$isRootOrShadowRoot(k))break}X=new Set;for(var oe=0;oe<T;oe++){var Z=v[oe];e.$isElementNode(Z)&&Z.getChildrenSize()===0&&X.add(Z.getKey())}var K=new Set;for(oe=0;oe<T;oe++){Z=v[oe];var Q=Z.getParent();if(Q!==null&&Q.isInline()&&(Q=Q.getParent()),Q!==null&&e.$isLeafNode(Z)&&!K.has(Z.getKey())){if(Z=Q.getKey(),P.get(Z)===void 0){let de=O();de.setFormat(Q.getFormatType()),de.setIndent(Q.getIndent()),M.push(de),P.set(Z,de),Q.getChildren().forEach(pe=>{de.append(pe),K.add(pe.getKey()),e.$isElementNode(pe)&&pe.getChildrenKeys().forEach(ne=>K.add(ne))}),p(Q)}}else X.has(Z.getKey())&&(Q=O(),Q.setFormat(Z.getFormatType()),Q.setIndent(Z.getIndent()),M.push(Q),Z.remove(!0))}if(R!==null)for(v=0;v<M.length;v++)R.append(M[v]);if(v=null,e.$isRootOrShadowRoot(k))if(Y)if(R!==null)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)k.insertAfter(M[R]);else if(Y=k.getFirstChild(),e.$isElementNode(Y)&&(k=Y),Y===null)if(R)k.append(R);else for(R=0;R<M.length;R++)Y=M[R],k.append(Y),v=Y;else if(R!==null)Y.insertBefore(R);else for(k=0;k<M.length;k++)R=M[k],Y.insertBefore(R),v=R;else if(R)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)Y=M[R],k.insertAfter(Y),v=Y;M=e.$getPreviousSelection(),e.$isRangeSelection(M)&&M.anchor.getNode().isAttached()&&M.focus.getNode().isAttached()?e.$setSelection(M.clone()):v!==null?v.selectEnd():y.dirty=!0}}function b(y,v,T,O){y.modify(v?"extend":"move",T,O)}function C(y){return y=y.anchor.getNode(),(e.$isRootNode(y)?y:y.getParentOrThrow()).getDirection()==="rtl"}function _(y){if(e.$isDecoratorNode(y)&&!y.isInline())return!0;if(!e.$isElementNode(y)||e.$isRootOrShadowRoot(y))return!1;var v=y.getFirstChild();return v=v===null||e.$isLineBreakNode(v)||e.$isTextNode(v)||v.isInline(),!y.isInline()&&y.canBeEmpty()!==!1&&v}return sr.$addNodeStyle=function(y){y=y.getStyle();let v=o(y);t.set(y,v)},sr.$cloneWithProperties=function(y){let v=y.constructor.clone(y);return v.__parent=y.__parent,v.__next=y.__next,v.__prev=y.__prev,e.$isElementNode(y)&&e.$isElementNode(v)?(v.__first=y.__first,v.__last=y.__last,v.__size=y.__size,v.__format=y.__format,v.__indent=y.__indent,v.__dir=y.__dir,v):(e.$isTextNode(y)&&e.$isTextNode(v)&&(v.__format=y.__format,v.__style=y.__style,v.__mode=y.__mode,v.__detail=y.__detail),v)},sr.$getSelectionStyleValueForProperty=function(y,v,T=""){let O=null,R=y.getNodes();var k=y.anchor,P=y.focus,M=y.isBackward();let Y=M?P.offset:k.offset;if(k=M?P.getNode():k.getNode(),y.isCollapsed()&&y.style!==""&&(y=i(y.style),y!==null&&v in y))return y[v];for(y=0;y<R.length;y++){var X=R[y];if((y===0||Y!==0||!X.is(k))&&e.$isTextNode(X)){if(P=v,M=T,X=X.getStyle(),X=i(X),P=X!==null&&X[P]||M,O===null)O=P;else if(O!==P){O="";break}}}return O===null?T:O},sr.$isAtNodeEnd=function(y){return y.type==="text"?y.offset===y.getNode().getTextContentSize():y.offset===y.getNode().getChildrenSize()},sr.$isParentElementRTL=C,sr.$moveCaretSelection=b,sr.$moveCharacter=function(y,v,T){let O=C(y);b(y,v,T?!O:O,"character")},sr.$patchStyleText=u,sr.$selectAll=function(y){let v=y.anchor;y=y.focus;var T=v.getNode().getTopLevelElementOrThrow().getParentOrThrow();let O=T.getFirstDescendant();T=T.getLastDescendant();let R="element",k="element",P=0;e.$isTextNode(O)?R="text":e.$isElementNode(O)||O===null||(O=O.getParentOrThrow()),e.$isTextNode(T)?(k="text",P=T.getTextContentSize()):e.$isElementNode(T)||T===null||(T=T.getParentOrThrow()),O&&T&&(v.set(O.getKey(),0,R),y.set(T.getKey(),P,k))},sr.$setBlocksType=function(y,v){if(y.anchor.key==="root"){v=v();var T=e.$getRoot();(y=T.getFirstChild())?y.replace(v,!0):T.append(v)}else{for(T=y.getNodes(),y=y.anchor.getNode();y!==null&&y.getParent()!==null&&!_(y);)y=y.getParentOrThrow();for((y=_(y)?y:null)&&T.indexOf(y)===-1&&T.push(y),y=0;y<T.length;y++){let O=T[y];if(!_(O))continue;let R=v();R.setFormat(O.getFormatType()),R.setIndent(O.getIndent()),O.replace(R,!0)}}},sr.$shouldOverrideDefaultCharacterSelection=function(y,v){return y=e.$getAdjacentNode(y.focus,v),e.$isDecoratorNode(y)&&!y.isIsolated()||e.$isElementNode(y)&&!y.isInline()&&!y.canBeEmpty()},sr.$sliceSelectedTextNodeContent=function(y,v){if(v.isSelected()&&!v.isSegmented()&&!v.isToken()&&e.$INTERNAL_isPointSelection(y)){var T=y.anchor.getNode(),O=y.focus.getNode(),R=v.is(T),k=v.is(O);if(R||k){R=y.isBackward();let[P,M]=y.getCharacterOffsets();y=T.is(O),k=v.is(R?O:T),O=v.is(R?T:O),T=0;let Y;y?(T=P>M?M:P,Y=P>M?P:M):k?(T=R?M:P,Y=void 0):O&&(R=R?P:M,T=0,Y=R),v.__text=v.__text.slice(T,Y)}}return v},sr.$wrapNodes=function(y,v,T=null){var O=y.getNodes();let R=O.length;var k=y.anchor;if(R===0||R===1&&k.type==="element"&&k.getNode().getChildrenSize()===0){y=k.type==="text"?k.getNode().getParentOrThrow():k.getNode(),O=y.getChildren();let M=v();M.setFormat(y.getFormatType()),M.setIndent(y.getIndent()),O.forEach(Y=>M.append(Y)),T&&(M=T.append(M)),y.replace(M)}else{k=null;var P=[];for(let M=0;M<R;M++){let Y=O[M];e.$isRootOrShadowRoot(Y)?(m(y,P,P.length,v,T),P=[],k=Y):k===null||k!==null&&e.$hasAncestor(Y,k)?P.push(Y):(m(y,P,P.length,v,T),P=[Y])}m(y,P,P.length,v,T)}},sr.createDOMRange=function(y,v,T,O,R){let k=v.getKey(),P=O.getKey(),M=document.createRange(),Y=y.getElementByKey(k);if(y=y.getElementByKey(P),e.$isTextNode(v)&&(Y=n(Y)),e.$isTextNode(O)&&(y=n(y)),v===void 0||O===void 0||Y===null||y===null)return null;Y.nodeName==="BR"&&([Y,T]=r(Y)),y.nodeName==="BR"&&([y,R]=r(y)),v=Y.firstChild,Y===y&&v!=null&&v.nodeName==="BR"&&T===0&&R===0&&(R=1);try{M.setStart(Y,T),M.setEnd(y,R)}catch{return null}return!M.collapsed||T===R&&k===P||(M.setStart(y,R),M.setEnd(Y,T)),M},sr.createRectsFromDOMRange=function(y,v){var T=y.getRootElement();if(T===null)return[];y=T.getBoundingClientRect(),T=getComputedStyle(T),T=parseFloat(T.paddingLeft)+parseFloat(T.paddingRight),v=Array.from(v.getClientRects());let O=v.length;v.sort((k,P)=>{let M=k.top-P.top;return 3>=Math.abs(M)?k.left-P.left:M});let R;for(let k=0;k<O;k++){let P=v[k],M=P.width+T===y.width;R&&R.top<=P.top&&R.top+R.height>P.top&&R.left+R.width>P.left||M?(v.splice(k--,1),O--):R=P}return v},sr.getStyleObjectFromCSS=i,sr.trimTextContentFromAnchor=function(y,v,T){let O=v.getNode();if(e.$isElementNode(O)){var R=O.getDescendantByIndex(v.offset);R!==null&&(O=R)}for(;0<T&&O!==null;){e.$isElementNode(O)&&(R=O.getLastDescendant(),R!==null&&(O=R));var k=O.getPreviousSibling(),P=0;if(k===null){R=O.getParentOrThrow();for(var M=R.getPreviousSibling();M===null;){if(R=R.getParent(),R===null){k=null;break}M=R.getPreviousSibling()}R!==null&&(P=R.isInline()?0:2,k=M)}if(M=O.getTextContent(),M===""&&e.$isElementNode(O)&&!O.isInline()&&(M=`
268
-
269
- `),R=M.length,!e.$isTextNode(O)||T>=R)M=O.getParent(),O.remove(),M==null||M.getChildrenSize()!==0||e.$isRootNode(M)||M.remove(),T-=R+P,O=k;else{let Y=O.getKey();P=y.getEditorState().read(()=>{const oe=e.$getNodeByKey(Y);return e.$isTextNode(oe)&&oe.isSimpleText()?oe.getTextContent():null}),k=R-T;let X=M.slice(0,k);P!==null&&P!==M?(T=e.$getPreviousSelection(),R=O,O.isSimpleText()?O.setTextContent(P):(R=e.$createTextNode(P),O.replace(R)),e.$isRangeSelection(T)&&T.isCollapsed()&&(T=T.anchor.offset,R.select(T,T))):O.isSimpleText()?(P=v.key===Y,M=v.offset,M<T&&(M=R),T=P?M-T:0,R=P?M:k,P&&T===0?([T]=O.splitText(T,R),T.remove()):([,T]=O.splitText(T,R),T.remove())):(T=e.$createTextNode(X),O.replace(T)),T=0}}},sr}var Xb,Qb;function za(){return Qb||(Qb=1,Xb=process.env.NODE_ENV==="development"?i7():a7()),Xb}var e_;function s7(){if(e_)return In;e_=1;var e=za(),t=Xt();function n(...X){return()=>{X.forEach(oe=>oe())}}function r(X){return`${X}px`}const o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(X,oe,Z){let K=null,Q=null,de=null,pe=[];const ne=document.createElement("div");function fe(){if(K===null)throw Error("Unexpected null rootDOMNode");if(Q===null)throw Error("Unexpected null parentDOMNode");const{left:re,top:B}=K.getBoundingClientRect(),W=Q,J=e.createRectsFromDOMRange(X,oe);ne.isConnected||W.append(ne);let F=!1;for(let w=0;w<J.length;w++){const N=J[w],I=pe[w]||document.createElement("div"),q=I.style;q.position!=="absolute"&&(q.position="absolute",F=!0);const ue=r(N.left-re);q.left!==ue&&(q.left=ue,F=!0);const he=r(N.top-B);q.top!==he&&(I.style.top=he,F=!0);const se=r(N.width);q.width!==se&&(I.style.width=se,F=!0);const Ce=r(N.height);q.height!==Ce&&(I.style.height=Ce,F=!0),I.parentNode!==ne&&(ne.append(I),F=!0),pe[w]=I}for(;pe.length>J.length;)pe.pop();F&&Z(pe)}function U(){Q=null,K=null,de!==null&&de.disconnect(),de=null,ne.remove();for(const re of pe)re.remove();pe=[]}function j(){const re=X.getRootElement();if(re===null)return U();const B=re.parentElement;if(!(B instanceof HTMLElement))return U();U(),K=re,Q=B,de=new MutationObserver(W=>{const J=X.getRootElement(),F=J&&J.parentElement;if(J!==K||F!==Q)return j();for(const w of W)if(!ne.contains(w.target))return fe()}),de.observe(B,o),fe()}const ee=X.registerRootListener(j);return()=>{ee(),U()}}function a(X,oe){let Z=null,K=null,Q=null,de=null,pe=()=>{};function ne(fe){fe.read(()=>{const U=t.$getSelection();if(!t.$isRangeSelection(U)){Z=null,K=null,Q=null,de=null,pe(),pe=()=>{};return}const{anchor:j,focus:ee}=U,re=j.getNode(),B=re.getKey(),W=j.offset,J=ee.getNode(),F=J.getKey(),w=ee.offset,N=X.getElementByKey(B),I=X.getElementByKey(F),q=Z===null||N===null||W!==K||B!==Z.getKey()||re!==Z&&(!(Z instanceof t.TextNode)||re.updateDOM(Z,N,X._config)),ue=Q===null||I===null||w!==de||F!==Q.getKey()||J!==Q&&(!(Q instanceof t.TextNode)||J.updateDOM(Q,I,X._config));if(q||ue){const he=X.getElementByKey(j.getNode().getKey()),se=X.getElementByKey(ee.getNode().getKey());if(he!==null&&se!==null&&he.tagName==="SPAN"&&se.tagName==="SPAN"){const Ce=document.createRange();let Oe,Be,ce,le;ee.isBefore(j)?(Oe=se,Be=ee.offset,ce=he,le=j.offset):(Oe=he,Be=j.offset,ce=se,le=ee.offset);const ve=Oe.firstChild;if(ve===null)throw Error("Expected text node to be first child of span");const Me=ce.firstChild;if(Me===null)throw Error("Expected text node to be first child of span");Ce.setStart(ve,Be),Ce.setEnd(Me,le),pe(),pe=i(X,Ce,Pe=>{for(const We of Pe){const Xe=We.style;Xe.background!=="Highlight"&&(Xe.background="Highlight"),Xe.color!=="HighlightText"&&(Xe.color="HighlightText"),Xe.zIndex!=="-1"&&(Xe.zIndex="-1"),Xe.pointerEvents!=="none"&&(Xe.pointerEvents="none"),Xe.marginTop!==r(-1.5)&&(Xe.marginTop=r(-1.5)),Xe.paddingTop!==r(4)&&(Xe.paddingTop=r(4)),Xe.paddingBottom!==r(0)&&(Xe.paddingBottom=r(0))}oe!==void 0&&oe(Pe)})}}Z=re,K=W,Q=J,de=w})}return ne(X.getEditorState()),n(X.registerUpdateListener(({editorState:fe})=>ne(fe)),pe,()=>{pe()})}function l(X,...oe){oe.forEach(Z=>{if(typeof Z=="string"){const K=Z.split(" ").filter(Q=>Q!=="");X.classList.add(...K)}})}function u(X,...oe){oe.forEach(Z=>{typeof Z=="string"&&X.classList.remove(...Z.split(" "))})}function p(X,oe){for(const Z of oe)if(X.type.startsWith(Z))return!0;return!1}function m(X,oe){const Z=X[Symbol.iterator]();return new Promise((K,Q)=>{const de=[],pe=()=>{const{done:ne,value:fe}=Z.next();if(ne)return K(de);const U=new FileReader;U.addEventListener("error",Q),U.addEventListener("load",()=>{const j=U.result;typeof j=="string"&&de.push({file:fe,result:j}),pe()}),p(fe,oe)?U.readAsDataURL(fe):pe()};pe()})}function b(X,oe){const Z=[],K=(X||t.$getRoot()).getLatest(),Q=oe||(t.$isElementNode(K)?K.getLastDescendant():K);let de=K,pe=C(de);for(;de!==null&&!de.is(Q);)if(Z.push({depth:pe,node:de}),t.$isElementNode(de)&&de.getChildrenSize()>0)de=de.getFirstChild(),pe++;else{let ne=null;for(;ne===null&&de!==null;)ne=de.getNextSibling(),ne===null?(de=de.getParent(),pe--):de=ne}return de!==null&&de.is(Q)&&Z.push({depth:pe,node:de}),Z}function C(X){let oe=X,Z=0;for(;(oe=oe.getParent())!==null;)Z++;return Z}function _(X,oe){let Z=X;for(;Z!=null;){if(Z instanceof oe)return Z;Z=Z.getParent()}return null}function y(X){const oe=v(X,Z=>t.$isElementNode(Z)&&!Z.isInline());if(!t.$isElementNode(oe))throw Error(`Expected node ${X.__key} to have closest block element node.`);return oe}function v(X,oe){let Z=X;for(;Z!==t.$getRoot()&&Z!=null;){if(oe(Z))return Z;Z=Z.getParent()}return null}function T(X,oe,Z,K){const Q=ne=>ne instanceof oe,de=ne=>{const fe=ne.getChildren();for(let ee=0;ee<fe.length;ee++){const re=fe[ee];if(Q(re))return null}let U=ne,j=ne;for(;U!==null;)if(j=U,U=U.getParent(),Q(U))return{child:j,parent:U};return null},pe=ne=>{const fe=de(ne);if(fe!==null){const{child:U,parent:j}=fe;if(U.is(ne)){K(j,ne);const ee=U.getNextSiblings(),re=ee.length;if(j.insertAfter(U),re!==0){const B=Z(j);U.insertAfter(B);for(let W=0;W<re;W++)B.append(ee[W])}!j.canBeEmpty()&&j.getChildrenSize()===0&&j.remove()}}};return X.registerNodeTransform(oe,pe)}function O(X,oe){const Z=new Map,K=X._pendingEditorState;for(const[de,pe]of oe._nodeMap){const ne=e.$cloneWithProperties(pe);t.$isTextNode(ne)&&(ne.__text=pe.__text),Z.set(de,ne)}K&&(K._nodeMap=Z),X._dirtyType=2;const Q=oe._selection;t.$setSelection(Q===null?null:Q.clone())}function R(X){const oe=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(oe)){const{focus:Z}=oe,K=Z.getNode(),Q=Z.offset;if(t.$isRootOrShadowRoot(K)){const de=K.getChildAtIndex(Q);de==null?K.append(X):de.insertBefore(X),X.selectNext()}else{let de,pe;t.$isTextNode(K)?(de=K.getParentOrThrow(),pe=K.getIndexWithinParent(),Q>0&&(pe+=1,K.splitText(Q))):(de=K,pe=Q);const[,ne]=t.$splitNode(de,pe);ne.insertBefore(X),ne.selectStart()}}else{if(oe!=null){const K=oe.getNodes();K[K.length-1].getTopLevelElementOrThrow().insertAfter(X)}else t.$getRoot().append(X);const Z=t.$createParagraphNode();X.insertAfter(Z),Z.select()}return X.getLatest()}function k(X,oe){const Z=oe();return X.replace(Z),Z.append(X),Z}function P(X,oe){return X!==null?Object.getPrototypeOf(X).constructor.name===oe.name:!1}function M(X,oe){const Z=[];for(let K=0;K<X.length;K++){const Q=oe(X[K]);Q!==null&&Z.push(Q)}return Z}function Y(X,oe){const Z=X.getFirstChild();Z!==null?Z.insertBefore(oe):X.append(oe)}return In.$splitNode=t.$splitNode,In.isHTMLAnchorElement=t.isHTMLAnchorElement,In.isHTMLElement=t.isHTMLElement,In.$dfs=b,In.$filter=M,In.$findMatchingParent=v,In.$getNearestBlockElementAncestorOrThrow=y,In.$getNearestNodeOfType=_,In.$insertFirst=Y,In.$insertNodeToNearestRoot=R,In.$restoreEditorState=O,In.$wrapNodeInElement=k,In.addClassNamesToElement=l,In.isMimeType=p,In.markSelection=a,In.mediaFileReader=m,In.mergeRegister=n,In.objectKlassEquals=P,In.positionNodeOnRange=i,In.registerNestedElementResolver=T,In.removeClassNamesFromElement=u,In}var Ln={},t_;function l7(){if(t_)return Ln;t_=1;var e=za(),t=Xt();function n(u){let p=new URLSearchParams;p.append("code",u);for(let m=1;m<arguments.length;m++)p.append("v",arguments[m]);throw Error(`Minified Lexical error #${u}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...u){return()=>{u.forEach(p=>p())}}let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(u,p,m){function b(){if(y===null)throw Error("Unexpected null rootDOMNode");if(v===null)throw Error("Unexpected null parentDOMNode");let{left:P,top:M}=y.getBoundingClientRect();var Y=v;let X=e.createRectsFromDOMRange(u,p);R.isConnected||Y.append(R),Y=!1;for(let K=0;K<X.length;K++){var oe=X[K];let Q=O[K]||document.createElement("div"),de=Q.style;de.position!=="absolute"&&(de.position="absolute",Y=!0);var Z=`${oe.left-P}px`;de.left!==Z&&(de.left=Z,Y=!0),Z=`${oe.top-M}px`,de.top!==Z&&(Q.style.top=Z,Y=!0),Z=`${oe.width}px`,de.width!==Z&&(Q.style.width=Z,Y=!0),oe=`${oe.height}px`,de.height!==oe&&(Q.style.height=oe,Y=!0),Q.parentNode!==R&&(R.append(Q),Y=!0),O[K]=Q}for(;O.length>X.length;)O.pop();Y&&m(O)}function C(){y=v=null,T!==null&&T.disconnect(),T=null,R.remove();for(let P of O)P.remove();O=[]}function _(){let P=u.getRootElement();if(P===null)return C();let M=P.parentElement;if(!(M instanceof HTMLElement))return C();C(),y=P,v=M,T=new MutationObserver(Y=>{let X=u.getRootElement(),oe=X&&X.parentElement;if(X!==y||oe!==v)return _();for(let Z of Y)if(!R.contains(Z.target))return b()}),T.observe(M,o),b()}let y=null,v=null,T=null,O=[],R=document.createElement("div"),k=u.registerRootListener(_);return()=>{k(),C()}}function a(u,p){for(let m of p)if(u.type.startsWith(m))return!0;return!1}function l(u,p){for(;u!==t.$getRoot()&&u!=null;){if(p(u))return u;u=u.getParent()}return null}return Ln.$splitNode=t.$splitNode,Ln.isHTMLAnchorElement=t.isHTMLAnchorElement,Ln.isHTMLElement=t.isHTMLElement,Ln.$dfs=function(u,p){let m=[];u=(u||t.$getRoot()).getLatest(),p=p||(t.$isElementNode(u)?u.getLastDescendant():u);for(var b=u,C=0;(b=b.getParent())!==null;)C++;for(b=C;u!==null&&!u.is(p);)if(m.push({depth:b,node:u}),t.$isElementNode(u)&&0<u.getChildrenSize())u=u.getFirstChild(),b++;else for(C=null;C===null&&u!==null;)C=u.getNextSibling(),C===null?(u=u.getParent(),b--):u=C;return u!==null&&u.is(p)&&m.push({depth:b,node:u}),m},Ln.$filter=function(u,p){let m=[];for(let b=0;b<u.length;b++){let C=p(u[b]);C!==null&&m.push(C)}return m},Ln.$findMatchingParent=l,Ln.$getNearestBlockElementAncestorOrThrow=function(u){let p=l(u,m=>t.$isElementNode(m)&&!m.isInline());return t.$isElementNode(p)||n(4,u.__key),p},Ln.$getNearestNodeOfType=function(u,p){for(;u!=null;){if(u instanceof p)return u;u=u.getParent()}return null},Ln.$insertFirst=function(u,p){let m=u.getFirstChild();m!==null?m.insertBefore(p):u.append(p)},Ln.$insertNodeToNearestRoot=function(u){var p=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(p)){var{focus:m}=p;if(p=m.getNode(),m=m.offset,t.$isRootOrShadowRoot(p))m=p.getChildAtIndex(m),m==null?p.append(u):m.insertBefore(u),u.selectNext();else{let b,C;t.$isTextNode(p)?(b=p.getParentOrThrow(),C=p.getIndexWithinParent(),0<m&&(C+=1,p.splitText(m))):(b=p,C=m),[,p]=t.$splitNode(b,C),p.insertBefore(u),p.selectStart()}}else p!=null?(p=p.getNodes(),p[p.length-1].getTopLevelElementOrThrow().insertAfter(u)):t.$getRoot().append(u),p=t.$createParagraphNode(),u.insertAfter(p),p.select();return u.getLatest()},Ln.$restoreEditorState=function(u,p){let m=new Map,b=u._pendingEditorState;for(let[C,_]of p._nodeMap){let y=e.$cloneWithProperties(_);t.$isTextNode(y)&&(y.__text=_.__text),m.set(C,y)}b&&(b._nodeMap=m),u._dirtyType=2,u=p._selection,t.$setSelection(u===null?null:u.clone())},Ln.$wrapNodeInElement=function(u,p){return p=p(),u.replace(p),p.append(u),p},Ln.addClassNamesToElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&(m=m.split(" ").filter(b=>b!==""),u.classList.add(...m))})},Ln.isMimeType=a,Ln.markSelection=function(u,p){function m(T){T.read(()=>{var O=t.$getSelection();if(t.$isRangeSelection(O)){var{anchor:R,focus:k}=O;O=R.getNode();var P=O.getKey(),M=R.offset,Y=k.getNode(),X=Y.getKey(),oe=k.offset,Z=u.getElementByKey(P),K=u.getElementByKey(X);if(P=b===null||Z===null||M!==C||P!==b.getKey()||O!==b&&(!(b instanceof t.TextNode)||O.updateDOM(b,Z,u._config)),X=_===null||K===null||oe!==y||X!==_.getKey()||Y!==_&&(!(_ instanceof t.TextNode)||Y.updateDOM(_,K,u._config)),P||X){Z=u.getElementByKey(R.getNode().getKey());var Q=u.getElementByKey(k.getNode().getKey());if(Z!==null&&Q!==null&&Z.tagName==="SPAN"&&Q.tagName==="SPAN"){if(X=document.createRange(),k.isBefore(R)?(P=Q,K=k.offset,Q=Z,Z=R.offset):(P=Z,K=R.offset,Z=k.offset),P=P.firstChild,P===null||(Q=Q.firstChild,Q===null))throw Error("Expected text node to be first child of span");X.setStart(P,K),X.setEnd(Q,Z),v(),v=i(u,X,de=>{for(let pe of de){let ne=pe.style;ne.background!=="Highlight"&&(ne.background="Highlight"),ne.color!=="HighlightText"&&(ne.color="HighlightText"),ne.zIndex!=="-1"&&(ne.zIndex="-1"),ne.pointerEvents!=="none"&&(ne.pointerEvents="none"),ne.marginTop!=="-1.5px"&&(ne.marginTop="-1.5px"),ne.paddingTop!=="4px"&&(ne.paddingTop="4px"),ne.paddingBottom!=="0px"&&(ne.paddingBottom="0px")}p!==void 0&&p(de)})}}b=O,C=M,_=Y,y=oe}else y=_=C=b=null,v(),v=()=>{}})}let b=null,C=null,_=null,y=null,v=()=>{};return m(u.getEditorState()),r(u.registerUpdateListener(({editorState:T})=>m(T)),v,()=>{v()})},Ln.mediaFileReader=function(u,p){let m=u[Symbol.iterator]();return new Promise((b,C)=>{let _=[],y=()=>{const{done:v,value:T}=m.next();if(v)return b(_);const O=new FileReader;O.addEventListener("error",C),O.addEventListener("load",()=>{const R=O.result;typeof R=="string"&&_.push({file:T,result:R}),y()}),a(T,p)?O.readAsDataURL(T):y()};y()})},Ln.mergeRegister=r,Ln.objectKlassEquals=function(u,p){return u!==null?Object.getPrototypeOf(u).constructor.name===p.name:!1},Ln.positionNodeOnRange=i,Ln.registerNestedElementResolver=function(u,p,m,b){return u.registerNodeTransform(p,C=>{e:{for(var _=C.getChildren(),y=0;y<_.length;y++)if(_[y]instanceof p){_=null;break e}for(_=C;_!==null;)if(y=_,_=_.getParent(),_ instanceof p){_={child:y,parent:_};break e}_=null}if(_!==null){const{child:v,parent:T}=_;if(v.is(C)){if(b(T,C),C=v.getNextSiblings(),_=C.length,T.insertAfter(v),_!==0){y=m(T),v.insertAfter(y);for(let O=0;O<_;O++)y.append(C[O])}T.canBeEmpty()||T.getChildrenSize()!==0||T.remove()}}})},Ln.removeClassNamesFromElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&u.classList.remove(...m.split(" "))})},Ln}var n_,r_;function yn(){return r_||(r_=1,n_=process.env.NODE_ENV==="development"?s7():l7()),n_}var yp={},o_;function c7(){if(o_)return yp;o_=1;var e=Xt();function t(n){const r=window.location.origin,o=i=>{if(i.origin!==r)return;const a=n.getRootElement();if(document.activeElement!==a)return;const l=i.data;if(typeof l=="string"){let u;try{u=JSON.parse(l)}catch{return}if(u&&u.protocol==="nuanria_messaging"&&u.type==="request"){const p=u.payload;if(p&&p.functionId==="makeChanges"){const m=p.args;if(m){const[b,C,_,y,v,T]=m;n.update(()=>{const O=e.$getSelection();if(e.$isRangeSelection(O)){const R=O.anchor;let k=R.getNode(),P=0,M=0;if(e.$isTextNode(k)&&b>=0&&C>=0&&(P=b,M=b+C,O.setTextNodeRange(k,P,k,M)),(P!==M||_!=="")&&(O.insertRawText(_),k=R.getNode()),e.$isTextNode(k)){P=y,M=y+v;const Y=k.getTextContentSize();P=P>Y?Y:P,M=M>Y?Y:M,O.setTextNodeRange(k,P,k,M)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}}return yp.registerDragonSupport=t,yp}var vp={},i_;function u7(){if(i_)return vp;i_=1;var e=Xt();return vp.registerDragonSupport=function(t){let n=window.location.origin,r=o=>{if(o.origin===n){var i=t.getRootElement();if(document.activeElement===i&&(i=o.data,typeof i=="string")){try{var a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"&&(a=a.payload)&&a.functionId==="makeChanges"&&(a=a.args)){const[l,u,p,m,b]=a;t.update(()=>{const C=e.$getSelection();if(e.$isRangeSelection(C)){var _=C.anchor;let y=_.getNode(),v=0,T=0;e.$isTextNode(y)&&0<=l&&0<=u&&(v=l,T=l+u,C.setTextNodeRange(y,v,y,T)),(v!==T||p!=="")&&(C.insertRawText(p),y=_.getNode()),e.$isTextNode(y)&&(v=m,T=m+b,_=y.getTextContentSize(),v=v>_?_:v,T=T>_?_:T,C.setTextNodeRange(y,v,y,T)),o.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},vp}var a_,s_;function $N(){return s_||(s_=1,a_=process.env.NODE_ENV==="development"?c7():u7()),a_}var Fo={},pi={},Kd={},l_;function d7(){if(l_)return Kd;l_=1;var e=za(),t=yn(),n=Xt();function r(p,m){const b=m.body?m.body.childNodes:[];let C=[];for(let _=0;_<b.length;_++){const y=b[_];if(!l.has(y.nodeName)){const v=u(y,p);v!==null&&(C=C.concat(v))}}return C}function o(p,m){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const b=document.createElement("div"),C=n.$getRoot().getChildren();for(let _=0;_<C.length;_++){const y=C[_];i(p,y,b,m)}return b.innerHTML}function i(p,m,b,C=null){let _=C!=null?m.isSelected(C):!0;const y=n.$isElementNode(m)&&m.excludeFromCopy("html");let v=m;if(C!==null){let Y=e.$cloneWithProperties(m);Y=n.$isTextNode(Y)&&C!=null?e.$sliceSelectedTextNodeContent(C,Y):Y,v=Y}const T=n.$isElementNode(v)?v.getChildren():[],O=p._nodes.get(v.getType());let R;O&&O.exportDOM!==void 0?R=O.exportDOM(p,v):R=v.exportDOM(p);const{element:k,after:P}=R;if(!k)return!1;const M=document.createDocumentFragment();for(let Y=0;Y<T.length;Y++){const X=T[Y],oe=i(p,X,M,C);!_&&n.$isElementNode(m)&&oe&&m.extractWithChild(X,C,"html")&&(_=!0)}if(_&&!y){if(t.isHTMLElement(k)&&k.append(M),b.append(k),P){const Y=P.call(v,k);Y&&k.replaceWith(Y)}}else b.append(M);return _}function a(p,m){const{nodeName:b}=p,C=m._htmlConversions.get(b.toLowerCase());let _=null;if(C!==void 0)for(const y of C){const v=y(p);v!==null&&(_===null||_.priority<v.priority)&&(_=v)}return _!==null?_.conversion:null}const l=new Set(["STYLE","SCRIPT"]);function u(p,m,b=new Map,C){let _=[];if(l.has(p.nodeName))return _;let y=null;const v=a(p,m),T=v?v(p):null;let O=null;if(T!==null){O=T.after;const P=T.node;if(y=Array.isArray(P)?P[P.length-1]:P,y!==null){for(const[,M]of b)if(y=M(y,C),!y)break;y&&_.push(...Array.isArray(P)?P:[y])}T.forChild!=null&&b.set(p.nodeName,T.forChild)}const R=p.childNodes;let k=[];for(let P=0;P<R.length;P++)k.push(...u(R[P],m,new Map(b),y));return O!=null&&(k=O(k)),y==null?_=_.concat(k):n.$isElementNode(y)&&y.append(...k),_}return Kd.$generateHtmlFromNodes=o,Kd.$generateNodesFromDOM=r,Kd}var Ud={},c_;function f7(){if(c_)return Ud;c_=1;var e=za(),t=yn(),n=Xt();function r(a,l,u,p=null){let m=p!=null?l.isSelected(p):!0,b=n.$isElementNode(l)&&l.excludeFromCopy("html");var C=l;p!==null&&(C=e.$cloneWithProperties(l),C=n.$isTextNode(C)&&p!=null?e.$sliceSelectedTextNodeContent(p,C):C);let _=n.$isElementNode(C)?C.getChildren():[];var y=a._nodes.get(C.getType());y=y&&y.exportDOM!==void 0?y.exportDOM(a,C):C.exportDOM(a);let{element:v,after:T}=y;if(!v)return!1;y=document.createDocumentFragment();for(let O=0;O<_.length;O++){let R=_[O],k=r(a,R,y,p);!m&&n.$isElementNode(l)&&k&&l.extractWithChild(R,p,"html")&&(m=!0)}return m&&!b?(t.isHTMLElement(v)&&v.append(y),u.append(v),T&&(a=T.call(C,v))&&v.replaceWith(a)):u.append(y),m}let o=new Set(["STYLE","SCRIPT"]);function i(a,l,u=new Map,p){let m=[];if(o.has(a.nodeName))return m;let b=null;var C,{nodeName:_}=a,y=l._htmlConversions.get(_.toLowerCase());if(_=null,y!==void 0)for(C of y)y=C(a),y!==null&&(_===null||_.priority<y.priority)&&(_=y);if(_=(C=_!==null?_.conversion:null)?C(a):null,C=null,_!==null){if(C=_.after,y=_.node,b=Array.isArray(y)?y[y.length-1]:y,b!==null){for(var[,v]of u)if(b=v(b,p),!b)break;b&&m.push(...Array.isArray(y)?y:[b])}_.forChild!=null&&u.set(a.nodeName,_.forChild)}for(a=a.childNodes,p=[],v=0;v<a.length;v++)p.push(...i(a[v],l,new Map(u),b));return C!=null&&(p=C(p)),b==null?m=m.concat(p):n.$isElementNode(b)&&b.append(...p),m}return Ud.$generateHtmlFromNodes=function(a,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let u=document.createElement("div"),p=n.$getRoot().getChildren();for(let m=0;m<p.length;m++)r(a,p[m],u,l);return u.innerHTML},Ud.$generateNodesFromDOM=function(a,l){l=l.body?l.body.childNodes:[];let u=[];for(let m=0;m<l.length;m++){var p=l[m];o.has(p.nodeName)||(p=i(p,a),p!==null&&(u=u.concat(p)))}return u},Ud}var u_,d_;function DN(){return d_||(d_=1,u_=process.env.NODE_ENV==="development"?d7():f7()),u_}var f_;function h7(){if(f_)return pi;f_=1;var e=DN(),t=za(),n=yn(),r=Xt();const o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",i=P=>o?(P||window).getSelection():null;function a(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?"":e.$generateHtmlFromNodes(P,M)}function l(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?null:JSON.stringify(y(P,M))}function u(P,M){const Y=P.getData("text/plain")||P.getData("text/uri-list");Y!=null&&M.insertRawText(Y)}function p(P,M,Y){const X=P.getData("application/x-lexical-editor");if(X)try{const K=JSON.parse(X);if(K.namespace===Y._config.namespace&&Array.isArray(K.nodes)){const Q=v(K.nodes);return m(Y,Q,M)}}catch{}const oe=P.getData("text/html");if(oe)try{const K=new DOMParser().parseFromString(oe,"text/html"),Q=e.$generateNodesFromDOM(Y,K);return m(Y,Q,M)}catch{}const Z=P.getData("text/plain")||P.getData("text/uri-list");if(Z!=null)if(r.$isRangeSelection(M)){const K=Z.split(/(\r?\n|\t)/);K[K.length-1]===""&&K.pop();for(let Q=0;Q<K.length;Q++){const de=K[Q];de===`
270
- `||de===`\r
271
- `?M.insertParagraph():de===" "?M.insertNodes([r.$createTabNode()]):M.insertText(de)}}else M.insertRawText(Z)}function m(P,M,Y){const X=r.DEPRECATED_$isGridSelection(Y),oe=r.$isRangeSelection(Y);if((X||oe&&n.$findMatchingParent(Y.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null&&n.$findMatchingParent(Y.focus.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null)&&M.length===1&&r.DEPRECATED_$isGridNode(M[0])){b(M,Y,!1,P);return}Y.insertNodes(M)}function b(P,M,Y,X){if(P.length!==1||!r.DEPRECATED_$isGridNode(P[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const oe=P[0],Z=oe.getChildren(),K=oe.getFirstChildOrThrow().getChildrenSize(),Q=oe.getChildrenSize(),de=n.$findMatchingParent(M.anchor.getNode(),q=>r.DEPRECATED_$isGridCellNode(q)),pe=de&&n.$findMatchingParent(de,q=>r.DEPRECATED_$isGridRowNode(q)),ne=pe&&n.$findMatchingParent(pe,q=>r.DEPRECATED_$isGridNode(q));if(!r.DEPRECATED_$isGridCellNode(de)||!r.DEPRECATED_$isGridRowNode(pe)||!r.DEPRECATED_$isGridNode(ne))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const fe=pe.getIndexWithinParent(),U=Math.min(ne.getChildrenSize()-1,fe+Q-1),j=de.getIndexWithinParent(),ee=Math.min(pe.getChildrenSize()-1,j+K-1),re=Math.min(j,ee),B=Math.min(fe,U),W=Math.max(j,ee),J=Math.max(fe,U),F=ne.getChildren();let w=0,N,I;for(let q=B;q<=J;q++){const ue=F[q];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const he=Z[w];if(!r.DEPRECATED_$isGridRowNode(he))throw Error("getNodes: expected to find GridRowNode");const se=ue.getChildren(),Ce=he.getChildren();let Oe=0;for(let Be=re;Be<=W;Be++){const ce=se[Be];if(!r.DEPRECATED_$isGridCellNode(ce))throw Error("getNodes: expected to find GridCellNode");const le=Ce[Oe];if(!r.DEPRECATED_$isGridCellNode(le))throw Error("getNodes: expected to find GridCellNode");q===B&&Be===re?N=ce.getKey():q===J&&Be===W&&(I=ce.getKey());const ve=ce.getChildren();le.getChildren().forEach(Me=>{r.$isTextNode(Me)&&r.$createParagraphNode().append(Me),ce.append(Me)}),ve.forEach(Me=>Me.remove()),Oe++}w++}if(N&&I){const q=r.DEPRECATED_$createGridSelection();q.set(ne.getKey(),N,I),r.$setSelection(q),X.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function C(P){const M=P.exportJSON(),Y=P.constructor;if(M.type!==Y.getType())throw Error(`LexicalNode: Node ${Y.name} does not implement .exportJSON().`);const X=M.children;if(r.$isElementNode(P)&&!Array.isArray(X))throw Error(`LexicalNode: Node ${Y.name} is an element but .exportJSON() does not have a children array.`);return M}function _(P,M,Y,X=[]){let oe=M!=null?Y.isSelected(M):!0;const Z=r.$isElementNode(Y)&&Y.excludeFromCopy("html");let K=Y;if(M!==null){let pe=t.$cloneWithProperties(Y);pe=r.$isTextNode(pe)&&M!=null?t.$sliceSelectedTextNodeContent(M,pe):pe,K=pe}const Q=r.$isElementNode(K)?K.getChildren():[],de=C(K);if(r.$isTextNode(K)){const pe=K.__text;pe.length>0?de.text=pe:oe=!1}for(let pe=0;pe<Q.length;pe++){const ne=Q[pe],fe=_(P,M,ne,de.children);!oe&&r.$isElementNode(Y)&&fe&&Y.extractWithChild(ne,M,"clone")&&(oe=!0)}if(oe&&!Z)X.push(de);else if(Array.isArray(de.children))for(let pe=0;pe<de.children.length;pe++){const ne=de.children[pe];X.push(ne)}return oe}function y(P,M){const Y=[],X=r.$getRoot().getChildren();for(let oe=0;oe<X.length;oe++){const Z=X[oe];_(P,M,Z,Y)}return{namespace:P._config.namespace,nodes:Y}}function v(P){const M=[];for(let Y=0;Y<P.length;Y++){const X=P[Y],oe=r.$parseSerializedNode(X);r.$isTextNode(oe)&&t.$addNodeStyle(oe),M.push(oe)}return M}const T=50;let O=null;async function R(P,M){if(O!==null)return!1;if(M!==null)return new Promise((Q,de)=>{P.update(()=>{Q(k(P,M))})});const Y=P.getRootElement(),X=P._window==null?window.document:P._window.document,oe=i(P._window);if(Y===null||oe===null)return!1;const Z=X.createElement("span");Z.style.cssText="position: fixed; top: -1000px;",Z.append(X.createTextNode("#")),Y.append(Z);const K=new Range;return K.setStart(Z,0),K.setEnd(Z,1),oe.removeAllRanges(),oe.addRange(K),new Promise((Q,de)=>{const pe=P.registerCommand(r.COPY_COMMAND,ne=>(n.objectKlassEquals(ne,ClipboardEvent)&&(pe(),O!==null&&(window.clearTimeout(O),O=null),Q(k(P,ne))),!0),r.COMMAND_PRIORITY_CRITICAL);O=window.setTimeout(()=>{pe(),O=null,Q(!1)},T),X.execCommand("copy"),Z.remove()})}function k(P,M){const Y=i(P._window);if(!Y)return!1;const X=Y.anchorNode,oe=Y.focusNode;if(X!==null&&oe!==null&&!r.isSelectionWithinEditor(P,X,oe))return!1;M.preventDefault();const Z=M.clipboardData,K=r.$getSelection();if(Z===null||K===null)return!1;const Q=a(P),de=l(P);let pe="";return K!==null&&(pe=K.getTextContent()),Q!==null&&Z.setData("text/html",Q),de!==null&&Z.setData("application/x-lexical-editor",de),Z.setData("text/plain",pe),!0}return pi.$generateJSONFromSelectedNodes=y,pi.$generateNodesFromSerializedNodes=v,pi.$getHtmlContent=a,pi.$getLexicalContent=l,pi.$insertDataTransferForPlainText=u,pi.$insertDataTransferForRichText=p,pi.$insertGeneratedNodes=m,pi.copyToClipboard=R,pi}var gi={},h_;function p7(){if(h_)return gi;h_=1;var e=DN(),t=za(),n=yn(),r=Xt();function o(v){let T=new URLSearchParams;T.append("code",v);for(let O=1;O<arguments.length;O++)T.append("v",arguments[O]);throw Error(`Minified Lexical error #${v}; visit https://lexical.dev/docs/error?${T} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?"":e.$generateHtmlFromNodes(v,T)}function l(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?null:JSON.stringify(b(v,T))}function u(v,T,O){let R=r.DEPRECATED_$isGridSelection(O),k=r.$isRangeSelection(O);(R||k&&n.$findMatchingParent(O.anchor.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null&&n.$findMatchingParent(O.focus.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null)&&T.length===1&&r.DEPRECATED_$isGridNode(T[0])?p(T,O,!1,v):O.insertNodes(T)}function p(v,T,O,R){v.length===1&&r.DEPRECATED_$isGridNode(v[0])||o(42);var k=v[0];v=k.getChildren(),O=k.getFirstChildOrThrow().getChildrenSize();var P=k.getChildrenSize(),M=n.$findMatchingParent(T.anchor.getNode(),de=>r.DEPRECATED_$isGridCellNode(de));T=(k=M&&n.$findMatchingParent(M,de=>r.DEPRECATED_$isGridRowNode(de)))&&n.$findMatchingParent(k,de=>r.DEPRECATED_$isGridNode(de)),r.DEPRECATED_$isGridCellNode(M)&&r.DEPRECATED_$isGridRowNode(k)&&r.DEPRECATED_$isGridNode(T)||o(43);var Y=k.getIndexWithinParent(),X=Math.min(T.getChildrenSize()-1,Y+P-1);P=M.getIndexWithinParent(),M=Math.min(k.getChildrenSize()-1,P+O-1),O=Math.min(P,M),k=Math.min(Y,X),P=Math.max(P,M),Y=Math.max(Y,X),X=T.getChildren(),M=0;let oe,Z;for(let de=k;de<=Y;de++){var K=X[de];r.DEPRECATED_$isGridRowNode(K)||o(24);var Q=v[M];r.DEPRECATED_$isGridRowNode(Q)||o(24),K=K.getChildren(),Q=Q.getChildren();let pe=0;for(let ne=O;ne<=P;ne++){let fe=K[ne];r.DEPRECATED_$isGridCellNode(fe)||o(25);let U=Q[pe];r.DEPRECATED_$isGridCellNode(U)||o(25),de===k&&ne===O?oe=fe.getKey():de===Y&&ne===P&&(Z=fe.getKey());let j=fe.getChildren();U.getChildren().forEach(ee=>{r.$isTextNode(ee)&&r.$createParagraphNode().append(ee),fe.append(ee)}),j.forEach(ee=>ee.remove()),pe++}M++}oe&&Z&&(v=r.DEPRECATED_$createGridSelection(),v.set(T.getKey(),oe,Z),r.$setSelection(v),R.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function m(v,T,O,R=[]){let k=T!=null?O.isSelected(T):!0,P=r.$isElementNode(O)&&O.excludeFromCopy("html");var M=O;if(T!==null){var Y=t.$cloneWithProperties(O);M=Y=r.$isTextNode(Y)&&T!=null?t.$sliceSelectedTextNodeContent(T,Y):Y}let X=r.$isElementNode(M)?M.getChildren():[];var oe=M;Y=oe.exportJSON();var Z=oe.constructor;Y.type!==Z.getType()&&o(58,Z.name);let K=Y.children;for(r.$isElementNode(oe)&&(Array.isArray(K)||o(59,Z.name)),r.$isTextNode(M)&&(M=M.__text,0<M.length?Y.text=M:k=!1),M=0;M<X.length;M++)oe=X[M],Z=m(v,T,oe,Y.children),!k&&r.$isElementNode(O)&&Z&&O.extractWithChild(oe,T,"clone")&&(k=!0);if(k&&!P)R.push(Y);else if(Array.isArray(Y.children))for(v=0;v<Y.children.length;v++)R.push(Y.children[v]);return k}function b(v,T){let O=[],R=r.$getRoot().getChildren();for(let k=0;k<R.length;k++)m(v,T,R[k],O);return{namespace:v._config.namespace,nodes:O}}function C(v){let T=[];for(let O=0;O<v.length;O++){let R=r.$parseSerializedNode(v[O]);r.$isTextNode(R)&&t.$addNodeStyle(R),T.push(R)}return T}let _=null;function y(v,T){var O=i?(v._window||window).getSelection():null;if(!O)return!1;var R=O.anchorNode;if(O=O.focusNode,R!==null&&O!==null&&!r.isSelectionWithinEditor(v,R,O)||(T.preventDefault(),T=T.clipboardData,R=r.$getSelection(),T===null||R===null))return!1;O=a(v),v=l(v);let k="";return R!==null&&(k=R.getTextContent()),O!==null&&T.setData("text/html",O),v!==null&&T.setData("application/x-lexical-editor",v),T.setData("text/plain",k),!0}return gi.$generateJSONFromSelectedNodes=b,gi.$generateNodesFromSerializedNodes=C,gi.$getHtmlContent=a,gi.$getLexicalContent=l,gi.$insertDataTransferForPlainText=function(v,T){v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null&&T.insertRawText(v)},gi.$insertDataTransferForRichText=function(v,T,O){var R=v.getData("application/x-lexical-editor");if(R)try{let P=JSON.parse(R);if(P.namespace===O._config.namespace&&Array.isArray(P.nodes)){let M=C(P.nodes);return u(O,M,T)}}catch{}if(R=v.getData("text/html"))try{var k=new DOMParser().parseFromString(R,"text/html");let P=e.$generateNodesFromDOM(O,k);return u(O,P,T)}catch{}if(v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null)if(r.$isRangeSelection(T))for(v=v.split(/(\r?\n|\t)/),v[v.length-1]===""&&v.pop(),O=0;O<v.length;O++)k=v[O],k===`
272
- `||k===`\r
273
- `?T.insertParagraph():k===" "?T.insertNodes([r.$createTabNode()]):T.insertText(k);else T.insertRawText(v)},gi.$insertGeneratedNodes=u,gi.copyToClipboard=async function(v,T){if(_!==null)return!1;if(T!==null)return new Promise(M=>{v.update(()=>{M(y(v,T))})});var O=v.getRootElement();let R=v._window==null?window.document:v._window.document,k=i?(v._window||window).getSelection():null;if(O===null||k===null)return!1;let P=R.createElement("span");return P.style.cssText="position: fixed; top: -1000px;",P.append(R.createTextNode("#")),O.append(P),O=new Range,O.setStart(P,0),O.setEnd(P,1),k.removeAllRanges(),k.addRange(O),new Promise(M=>{let Y=v.registerCommand(r.COPY_COMMAND,X=>(n.objectKlassEquals(X,ClipboardEvent)&&(Y(),_!==null&&(window.clearTimeout(_),_=null),M(y(v,X))),!0),r.COMMAND_PRIORITY_CRITICAL);_=window.setTimeout(()=>{Y(),_=null,M(!1)},50),R.execCommand("copy"),P.remove()})},gi}var p_,g_;function kN(){return g_||(g_=1,p_=process.env.NODE_ENV==="development"?h7():p7()),p_}var m_;function g7(){if(m_)return Fo;m_=1;var e=kN(),t=za(),n=yn(),r=Xt();function o(pe,ne){if(typeof document.caretRangeFromPoint<"u"){const fe=document.caretRangeFromPoint(pe,ne);return fe===null?null:{node:fe.startContainer,offset:fe.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const fe=document.caretPositionFromPoint(pe,ne);return fe===null?null:{node:fe.offsetNode,offset:fe.offset}}else return null}const i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),b=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class _ extends r.ElementNode{static getType(){return"quote"}static clone(ne){return new _(ne.__key)}constructor(ne){super(ne)}createDOM(ne){const fe=document.createElement("blockquote");return n.addClassNamesToElement(fe,ne.theme.quote),fe}updateDOM(ne,fe){return!1}static importDOM(){return{blockquote:ne=>({conversion:k,priority:0})}}exportDOM(ne){const{element:fe}=super.exportDOM(ne);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const U=this.getFormatType();fe.style.textAlign=U;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(ne){const fe=y();return fe.setFormat(ne.format),fe.setIndent(ne.indent),fe.setDirection(ne.direction),fe}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(ne,fe){const U=r.$createParagraphNode(),j=this.getDirection();return U.setDirection(j),this.insertAfter(U,fe),U}collapseAtStart(){const ne=r.$createParagraphNode();return this.getChildren().forEach(fe=>ne.append(fe)),this.replace(ne),!0}}function y(){return r.$applyNodeReplacement(new _)}function v(pe){return pe instanceof _}class T extends r.ElementNode{static getType(){return"heading"}static clone(ne){return new T(ne.__tag,ne.__key)}constructor(ne,fe){super(fe),this.__tag=ne}getTag(){return this.__tag}createDOM(ne){const fe=this.__tag,U=document.createElement(fe),j=ne.theme.heading;if(j!==void 0){const ee=j[fe];n.addClassNamesToElement(U,ee)}return U}updateDOM(ne,fe){return!1}static importDOM(){return{h1:ne=>({conversion:R,priority:0}),h2:ne=>({conversion:R,priority:0}),h3:ne=>({conversion:R,priority:0}),h4:ne=>({conversion:R,priority:0}),h5:ne=>({conversion:R,priority:0}),h6:ne=>({conversion:R,priority:0}),p:ne=>{const fe=ne.firstChild;return fe!==null&&O(fe)?{conversion:()=>({node:null}),priority:3}:null},span:ne=>O(ne)?{conversion:fe=>({node:P("h1")}),priority:3}:null}}exportDOM(ne){const{element:fe}=super.exportDOM(ne);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const U=this.getFormatType();fe.style.textAlign=U;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(ne){const fe=P(ne.tag);return fe.setFormat(ne.format),fe.setIndent(ne.indent),fe.setDirection(ne.direction),fe}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(ne,fe=!0){const U=ne?ne.anchor.offset:0,j=U===this.getTextContentSize()||!ne?r.$createParagraphNode():P(this.getTag()),ee=this.getDirection();if(j.setDirection(ee),this.insertAfter(j,fe),U===0&&!this.isEmpty()&&ne){const re=r.$createParagraphNode();re.select(),this.replace(re,!0)}return j}collapseAtStart(){const ne=this.isEmpty()?r.$createParagraphNode():P(this.getTag());return this.getChildren().forEach(fe=>ne.append(fe)),this.replace(ne),!0}extractWithChild(){return!0}}function O(pe){return pe.nodeName.toLowerCase()==="span"?pe.style.fontSize==="26pt":!1}function R(pe){const ne=pe.nodeName.toLowerCase();let fe=null;return(ne==="h1"||ne==="h2"||ne==="h3"||ne==="h4"||ne==="h5"||ne==="h6")&&(fe=P(ne),pe.style!==null&&fe.setFormat(pe.style.textAlign)),{node:fe}}function k(pe){const ne=y();return pe.style!==null&&ne.setFormat(pe.style.textAlign),{node:ne}}function P(pe){return r.$applyNodeReplacement(new T(pe))}function M(pe){return pe instanceof T}function Y(pe,ne){pe.preventDefault(),ne.update(()=>{const fe=r.$getSelection(),U=pe instanceof InputEvent||pe instanceof KeyboardEvent?null:pe.clipboardData;U!=null&&r.$INTERNAL_isPointSelection(fe)&&e.$insertDataTransferForRichText(U,fe,ne)},{tag:"paste"})}async function X(pe,ne){await e.copyToClipboard(ne,n.objectKlassEquals(pe,ClipboardEvent)?pe:null),ne.update(()=>{const fe=r.$getSelection();r.$isRangeSelection(fe)?fe.removeText():r.$isNodeSelection(fe)&&fe.getNodes().forEach(U=>U.remove())})}function oe(pe){let ne=null;if(pe instanceof DragEvent?ne=pe.dataTransfer:pe instanceof ClipboardEvent&&(ne=pe.clipboardData),ne===null)return[!1,[],!1];const fe=ne.types,U=fe.includes("Files"),j=fe.includes("text/html")||fe.includes("text/plain");return[U,Array.from(ne.files),j]}function Z(pe){const ne=r.$getSelection();if(!r.$isRangeSelection(ne))return!1;const fe=new Set,U=ne.getNodes();for(let j=0;j<U.length;j++){const ee=U[j],re=ee.getKey();if(fe.has(re))continue;const B=n.$getNearestBlockElementAncestorOrThrow(ee),W=B.getKey();B.canIndent()&&!fe.has(W)&&(fe.add(W),pe(B))}return fe.size>0}function K(pe){const ne=r.$getNearestNodeFromDOMNode(pe);return r.$isDecoratorNode(ne)}function Q(pe){const ne=pe.focus;return ne.key==="root"&&ne.offset===r.$getRoot().getChildrenSize()}function de(pe){return n.mergeRegister(pe.registerCommand(r.CLICK_COMMAND,ne=>{const fe=r.$getSelection();return r.$isNodeSelection(fe)?(fe.clear(),!0):!1},0),pe.registerCommand(r.DELETE_CHARACTER_COMMAND,ne=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteCharacter(ne),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_WORD_COMMAND,ne=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteWord(ne),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_LINE_COMMAND,ne=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteLine(ne),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,ne=>{const fe=r.$getSelection();if(typeof ne=="string")r.$INTERNAL_isPointSelection(fe)&&fe.insertText(ne);else{if(!r.$INTERNAL_isPointSelection(fe))return!1;const U=ne.dataTransfer;if(U!=null)e.$insertDataTransferForRichText(U,fe,pe);else if(r.$isRangeSelection(fe)){const j=ne.data;return j&&fe.insertText(j),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const ne=r.$getSelection();return r.$isRangeSelection(ne)?(ne.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_TEXT_COMMAND,ne=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.formatText(ne),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_ELEMENT_COMMAND,ne=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe)&&!r.$isNodeSelection(fe))return!1;const U=fe.getNodes();for(const j of U){const ee=n.$findMatchingParent(j,re=>r.$isElementNode(re)&&!re.isInline());ee!==null&&ee.setFormat(ne)}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_LINE_BREAK_COMMAND,ne=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.insertLineBreak(ne),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const ne=r.$getSelection();return r.$isRangeSelection(ne)?(ne.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INDENT_CONTENT_COMMAND,()=>Z(ne=>{const fe=ne.getIndent();ne.setIndent(fe+1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>Z(ne=>{const fe=ne.getIndent();fe>0&&ne.setIndent(fe-1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_UP_COMMAND,ne=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!K(ne.target)){const U=fe.getNodes();if(U.length>0)return U[0].selectPrevious(),!0}else if(r.$isRangeSelection(fe)){const U=r.$getAdjacentNode(fe.focus,!0);if(!ne.shiftKey&&r.$isDecoratorNode(U)&&!U.isIsolated()&&!U.isInline())return U.selectPrevious(),ne.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_DOWN_COMMAND,ne=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const U=fe.getNodes();if(U.length>0)return U[0].selectNext(0,0),!0}else if(r.$isRangeSelection(fe)){if(Q(fe))return ne.preventDefault(),!0;const U=r.$getAdjacentNode(fe.focus,!1);if(!ne.shiftKey&&r.$isDecoratorNode(U)&&!U.isIsolated()&&!U.isInline())return U.selectNext(),ne.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_LEFT_COMMAND,ne=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const U=fe.getNodes();if(U.length>0)return ne.preventDefault(),U[0].selectPrevious(),!0}if(!r.$isRangeSelection(fe))return!1;if(t.$shouldOverrideDefaultCharacterSelection(fe,!0)){const U=ne.shiftKey;return ne.preventDefault(),t.$moveCharacter(fe,U,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,ne=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!K(ne.target)){const j=fe.getNodes();if(j.length>0)return ne.preventDefault(),j[0].selectNext(0,0),!0}if(!r.$isRangeSelection(fe))return!1;const U=ne.shiftKey;return t.$shouldOverrideDefaultCharacterSelection(fe,!1)?(ne.preventDefault(),t.$moveCharacter(fe,U,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_BACKSPACE_COMMAND,ne=>{if(K(ne.target))return!1;const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;ne.preventDefault();const{anchor:U}=fe,j=U.getNode();return fe.isCollapsed()&&U.offset===0&&!r.$isRootNode(j)&&n.$getNearestBlockElementAncestorOrThrow(j).getIndent()>0?pe.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_DELETE_COMMAND,ne=>{if(K(ne.target))return!1;const fe=r.$getSelection();return r.$isRangeSelection(fe)?(ne.preventDefault(),pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ENTER_COMMAND,ne=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;if(ne!==null){if((p||u||b)&&l)return!1;if(ne.preventDefault(),ne.shiftKey)return pe.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return pe.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const ne=r.$getSelection();return r.$isRangeSelection(ne)?(pe.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DROP_COMMAND,ne=>{const[,fe]=oe(ne);if(fe.length>0){const j=ne.clientX,ee=ne.clientY,re=o(j,ee);if(re!==null){const{offset:B,node:W}=re,J=r.$getNearestNodeFromDOMNode(W);if(J!==null){const F=r.$createRangeSelection();if(r.$isTextNode(J))F.anchor.set(J.getKey(),B,"text"),F.focus.set(J.getKey(),B,"text");else{const N=J.getParentOrThrow().getKey(),I=J.getIndexWithinParent()+1;F.anchor.set(N,I,"element"),F.focus.set(N,I,"element")}const w=r.$normalizeSelection__EXPERIMENTAL(F);r.$setSelection(w)}pe.dispatchCommand(C,fe)}return ne.preventDefault(),!0}const U=r.$getSelection();return!!r.$isRangeSelection(U)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGSTART_COMMAND,ne=>{const[fe]=oe(ne),U=r.$getSelection();return!(fe&&!r.$isRangeSelection(U))},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGOVER_COMMAND,ne=>{const[fe]=oe(ne),U=r.$getSelection();if(fe&&!r.$isRangeSelection(U))return!1;const j=ne.clientX,ee=ne.clientY,re=o(j,ee);if(re!==null){const B=r.$getNearestNodeFromDOMNode(re.node);r.$isDecoratorNode(B)&&ne.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.COPY_COMMAND,ne=>(e.copyToClipboard(pe,n.objectKlassEquals(ne,ClipboardEvent)?ne:null),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CUT_COMMAND,ne=>(X(ne,pe),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.PASTE_COMMAND,ne=>{const[,fe,U]=oe(ne);if(fe.length>0&&!U)return pe.dispatchCommand(C,fe),!0;if(r.isSelectionCapturedInDecoratorInput(ne.target))return!1;const j=r.$getSelection();return r.$INTERNAL_isPointSelection(j)?(Y(ne,pe),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return Fo.$createHeadingNode=P,Fo.$createQuoteNode=y,Fo.$isHeadingNode=M,Fo.$isQuoteNode=v,Fo.DRAG_DROP_PASTE=C,Fo.HeadingNode=T,Fo.QuoteNode=_,Fo.eventFiles=oe,Fo.registerRichText=de,Fo}var jo={},y_;function m7(){if(y_)return jo;y_=1;var e=kN(),t=za(),n=yn(),r=Xt();function o(Z,K){return typeof document.caretRangeFromPoint<"u"?(Z=document.caretRangeFromPoint(Z,K),Z===null?null:{node:Z.startContainer,offset:Z.startOffset}):document.caretPositionFromPoint!=="undefined"?(Z=document.caretPositionFromPoint(Z,K),Z===null?null:{node:Z.offsetNode,offset:Z.offset}):null}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),b=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class _ extends r.ElementNode{static getType(){return"quote"}static clone(K){return new _(K.__key)}constructor(K){super(K)}createDOM(K){let Q=document.createElement("blockquote");return n.addClassNamesToElement(Q,K.theme.quote),Q}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:R,priority:0})}}exportDOM(K){if({element:K}=super.exportDOM(K),K&&n.isHTMLElement(K)){this.isEmpty()&&K.append(document.createElement("br"));var Q=this.getFormatType();K.style.textAlign=Q,(Q=this.getDirection())&&(K.dir=Q)}return{element:K}}static importJSON(K){let Q=y();return Q.setFormat(K.format),Q.setIndent(K.indent),Q.setDirection(K.direction),Q}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(K,Q){K=r.$createParagraphNode();let de=this.getDirection();return K.setDirection(de),this.insertAfter(K,Q),K}collapseAtStart(){let K=r.$createParagraphNode();return this.getChildren().forEach(Q=>K.append(Q)),this.replace(K),!0}}function y(){return r.$applyNodeReplacement(new _)}class v extends r.ElementNode{static getType(){return"heading"}static clone(K){return new v(K.__tag,K.__key)}constructor(K,Q){super(Q),this.__tag=K}getTag(){return this.__tag}createDOM(K){let Q=this.__tag,de=document.createElement(Q);return K=K.theme.heading,K!==void 0&&n.addClassNamesToElement(de,K[Q]),de}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:O,priority:0}),h2:()=>({conversion:O,priority:0}),h3:()=>({conversion:O,priority:0}),h4:()=>({conversion:O,priority:0}),h5:()=>({conversion:O,priority:0}),h6:()=>({conversion:O,priority:0}),p:K=>(K=K.firstChild,K!==null&&T(K)?{conversion:()=>({node:null}),priority:3}:null),span:K=>T(K)?{conversion:()=>({node:k("h1")}),priority:3}:null}}exportDOM(K){if({element:K}=super.exportDOM(K),K&&n.isHTMLElement(K)){this.isEmpty()&&K.append(document.createElement("br"));var Q=this.getFormatType();K.style.textAlign=Q,(Q=this.getDirection())&&(K.dir=Q)}return{element:K}}static importJSON(K){let Q=k(K.tag);return Q.setFormat(K.format),Q.setIndent(K.indent),Q.setDirection(K.direction),Q}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(K,Q=!0){let de=K?K.anchor.offset:0,pe=de!==this.getTextContentSize()&&K?k(this.getTag()):r.$createParagraphNode(),ne=this.getDirection();return pe.setDirection(ne),this.insertAfter(pe,Q),de===0&&!this.isEmpty()&&K&&(K=r.$createParagraphNode(),K.select(),this.replace(K,!0)),pe}collapseAtStart(){let K=this.isEmpty()?r.$createParagraphNode():k(this.getTag());return this.getChildren().forEach(Q=>K.append(Q)),this.replace(K),!0}extractWithChild(){return!0}}function T(Z){return Z.nodeName.toLowerCase()==="span"?Z.style.fontSize==="26pt":!1}function O(Z){let K=Z.nodeName.toLowerCase(),Q=null;return(K==="h1"||K==="h2"||K==="h3"||K==="h4"||K==="h5"||K==="h6")&&(Q=k(K),Z.style!==null&&Q.setFormat(Z.style.textAlign)),{node:Q}}function R(Z){let K=y();return Z.style!==null&&K.setFormat(Z.style.textAlign),{node:K}}function k(Z){return r.$applyNodeReplacement(new v(Z))}function P(Z,K){Z.preventDefault(),K.update(()=>{let Q=r.$getSelection(),de=Z instanceof InputEvent||Z instanceof KeyboardEvent?null:Z.clipboardData;de!=null&&r.$INTERNAL_isPointSelection(Q)&&e.$insertDataTransferForRichText(de,Q,K)},{tag:"paste"})}async function M(Z,K){await e.copyToClipboard(K,n.objectKlassEquals(Z,ClipboardEvent)?Z:null),K.update(()=>{let Q=r.$getSelection();r.$isRangeSelection(Q)?Q.removeText():r.$isNodeSelection(Q)&&Q.getNodes().forEach(de=>de.remove())})}function Y(Z){let K=null;if(Z instanceof DragEvent?K=Z.dataTransfer:Z instanceof ClipboardEvent&&(K=Z.clipboardData),K===null)return[!1,[],!1];var Q=K.types;return Z=Q.includes("Files"),Q=Q.includes("text/html")||Q.includes("text/plain"),[Z,Array.from(K.files),Q]}function X(Z){var K=r.$getSelection();if(!r.$isRangeSelection(K))return!1;let Q=new Set;K=K.getNodes();for(let ne=0;ne<K.length;ne++){var de=K[ne],pe=de.getKey();Q.has(pe)||(de=n.$getNearestBlockElementAncestorOrThrow(de),pe=de.getKey(),de.canIndent()&&!Q.has(pe)&&(Q.add(pe),Z(de)))}return 0<Q.size}function oe(Z){return Z=r.$getNearestNodeFromDOMNode(Z),r.$isDecoratorNode(Z)}return jo.$createHeadingNode=k,jo.$createQuoteNode=y,jo.$isHeadingNode=function(Z){return Z instanceof v},jo.$isQuoteNode=function(Z){return Z instanceof _},jo.DRAG_DROP_PASTE=C,jo.HeadingNode=v,jo.QuoteNode=_,jo.eventFiles=Y,jo.registerRichText=function(Z){return n.mergeRegister(Z.registerCommand(r.CLICK_COMMAND,()=>{const K=r.$getSelection();return r.$isNodeSelection(K)?(K.clear(),!0):!1},0),Z.registerCommand(r.DELETE_CHARACTER_COMMAND,K=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteCharacter(K),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_WORD_COMMAND,K=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteWord(K),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_LINE_COMMAND,K=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteLine(K),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,K=>{const Q=r.$getSelection();if(typeof K=="string")r.$INTERNAL_isPointSelection(Q)&&Q.insertText(K);else{if(!r.$INTERNAL_isPointSelection(Q))return!1;const de=K.dataTransfer;de!=null?e.$insertDataTransferForRichText(de,Q,Z):r.$isRangeSelection(Q)&&(K=K.data)&&Q.insertText(K)}return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const K=r.$getSelection();return r.$isRangeSelection(K)?(K.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_TEXT_COMMAND,K=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.formatText(K),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_ELEMENT_COMMAND,K=>{var Q=r.$getSelection();if(!r.$isRangeSelection(Q)&&!r.$isNodeSelection(Q))return!1;Q=Q.getNodes();for(const de of Q)Q=n.$findMatchingParent(de,pe=>r.$isElementNode(pe)&&!pe.isInline()),Q!==null&&Q.setFormat(K);return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_LINE_BREAK_COMMAND,K=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.insertLineBreak(K),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const K=r.$getSelection();return r.$isRangeSelection(K)?(K.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INDENT_CONTENT_COMMAND,()=>X(K=>{const Q=K.getIndent();K.setIndent(Q+1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>X(K=>{const Q=K.getIndent();0<Q&&K.setIndent(Q-1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_UP_COMMAND,K=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(K.target)){if(K=Q.getNodes(),0<K.length)return K[0].selectPrevious(),!0}else if(r.$isRangeSelection(Q)&&(Q=r.$getAdjacentNode(Q.focus,!0),!K.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline()))return Q.selectPrevious(),K.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_DOWN_COMMAND,K=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)){if(K=Q.getNodes(),0<K.length)return K[0].selectNext(0,0),!0}else if(r.$isRangeSelection(Q)){let de=Q.focus;if(de.key==="root"&&de.offset===r.$getRoot().getChildrenSize())return K.preventDefault(),!0;if(Q=r.$getAdjacentNode(Q.focus,!1),!K.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline())return Q.selectNext(),K.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_LEFT_COMMAND,K=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)){var de=Q.getNodes();if(0<de.length)return K.preventDefault(),de[0].selectPrevious(),!0}return r.$isRangeSelection(Q)&&t.$shouldOverrideDefaultCharacterSelection(Q,!0)?(de=K.shiftKey,K.preventDefault(),t.$moveCharacter(Q,de,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,K=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(K.target)){var de=Q.getNodes();if(0<de.length)return K.preventDefault(),de[0].selectNext(0,0),!0}return r.$isRangeSelection(Q)?(de=K.shiftKey,t.$shouldOverrideDefaultCharacterSelection(Q,!1)?(K.preventDefault(),t.$moveCharacter(Q,de,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_BACKSPACE_COMMAND,K=>{if(oe(K.target))return!1;const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;K.preventDefault(),{anchor:K}=Q;const de=K.getNode();return Q.isCollapsed()&&K.offset===0&&!r.$isRootNode(de)&&0<n.$getNearestBlockElementAncestorOrThrow(de).getIndent()?Z.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_DELETE_COMMAND,K=>{if(oe(K.target))return!1;const Q=r.$getSelection();return r.$isRangeSelection(Q)?(K.preventDefault(),Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ENTER_COMMAND,K=>{const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;if(K!==null){if((p||u||b)&&l)return!1;if(K.preventDefault(),K.shiftKey)return Z.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return Z.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const K=r.$getSelection();return r.$isRangeSelection(K)?(Z.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DROP_COMMAND,K=>{const[,Q]=Y(K);if(0<Q.length){var de=o(K.clientX,K.clientY);if(de!==null){const{offset:ne,node:fe}=de;var pe=r.$getNearestNodeFromDOMNode(fe);if(pe!==null){if(de=r.$createRangeSelection(),r.$isTextNode(pe))de.anchor.set(pe.getKey(),ne,"text"),de.focus.set(pe.getKey(),ne,"text");else{const U=pe.getParentOrThrow().getKey();pe=pe.getIndexWithinParent()+1,de.anchor.set(U,pe,"element"),de.focus.set(U,pe,"element")}de=r.$normalizeSelection__EXPERIMENTAL(de),r.$setSelection(de)}Z.dispatchCommand(C,Q)}return K.preventDefault(),!0}return K=r.$getSelection(),!!r.$isRangeSelection(K)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGSTART_COMMAND,K=>{[K]=Y(K);const Q=r.$getSelection();return!(K&&!r.$isRangeSelection(Q))},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGOVER_COMMAND,K=>{var[Q]=Y(K);const de=r.$getSelection();return Q&&!r.$isRangeSelection(de)?!1:(Q=o(K.clientX,K.clientY),Q!==null&&(Q=r.$getNearestNodeFromDOMNode(Q.node),r.$isDecoratorNode(Q)&&K.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.COPY_COMMAND,K=>(e.copyToClipboard(Z,n.objectKlassEquals(K,ClipboardEvent)?K:null),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CUT_COMMAND,K=>(M(K,Z),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.PASTE_COMMAND,K=>{const[,Q,de]=Y(K);if(0<Q.length&&!de)return Z.dispatchCommand(C,Q),!0;if(r.isSelectionCapturedInDecoratorInput(K.target))return!1;const pe=r.$getSelection();return r.$INTERNAL_isPointSelection(pe)?(P(K,Z),!0):!1},r.COMMAND_PRIORITY_EDITOR))},jo}var v_,b_;function oy(){return b_||(b_=1,v_=process.env.NODE_ENV==="development"?g7():m7()),v_}var __;function y7(){if(__)return pp;__=1;var e=dr(),t=AN(),n=H,r=RN(),o=yn(),i=Fu,a=$N(),l=oy(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(v){return v.getEditorState().read(r.$canShowPlaceholderCurry(v.isComposing()))}function m(v){const[T,O]=n.useState(()=>p(v));return u(()=>{function R(){const k=p(v);O(k)}return R(),o.mergeRegister(v.registerUpdateListener(()=>{R()}),v.registerEditableListener(()=>{R()}))},[v]),T}function b(v,T){const[O,R]=n.useState(()=>v.getDecorators());return u(()=>v.registerDecoratorListener(k=>{i.flushSync(()=>{R(k)})}),[v]),n.useEffect(()=>{R(v.getDecorators())},[v]),n.useMemo(()=>{const k=[],P=Object.keys(O);for(let M=0;M<P.length;M++){const Y=P[M],X=n.createElement(T,{onError:Z=>v._onError(Z)},n.createElement(n.Suspense,{fallback:null},O[Y])),oe=v.getElementByKey(Y);oe!==null&&k.push(i.createPortal(X,oe,Y))}return k},[T,O,v])}function C(v){u(()=>o.mergeRegister(l.registerRichText(v),a.registerDragonSupport(v)),[v])}function _({contentEditable:v,placeholder:T,ErrorBoundary:O}){const[R]=e.useLexicalComposerContext(),k=b(R,O);return C(R),n.createElement(n.Fragment,null,v,n.createElement(y,{content:T}),k)}function y({content:v}){const[T]=e.useLexicalComposerContext(),O=m(T),R=t();return O?typeof v=="function"?v(R):v:null}return pp.RichTextPlugin=_,pp}var bp={},x_;function v7(){if(x_)return bp;x_=1;var e=dr(),t=AN(),n=H,r=RN(),o=yn(),i=Fu,a=$N(),l=oy(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(y){return y.getEditorState().read(r.$canShowPlaceholderCurry(y.isComposing()))}function m(y){let[v,T]=n.useState(()=>p(y));return u(()=>{function O(){let R=p(y);T(R)}return O(),o.mergeRegister(y.registerUpdateListener(()=>{O()}),y.registerEditableListener(()=>{O()}))},[y]),v}function b(y,v){let[T,O]=n.useState(()=>y.getDecorators());return u(()=>y.registerDecoratorListener(R=>{i.flushSync(()=>{O(R)})}),[y]),n.useEffect(()=>{O(y.getDecorators())},[y]),n.useMemo(()=>{let R=[],k=Object.keys(T);for(let P=0;P<k.length;P++){let M=k[P],Y=n.createElement(v,{onError:oe=>y._onError(oe)},n.createElement(n.Suspense,{fallback:null},T[M])),X=y.getElementByKey(M);X!==null&&R.push(i.createPortal(Y,X,M))}return R},[v,T,y])}function C(y){u(()=>o.mergeRegister(l.registerRichText(y),a.registerDragonSupport(y)),[y])}function _({content:y}){var[v]=e.useLexicalComposerContext();v=m(v);let T=t();return v?typeof y=="function"?y(T):y:null}return bp.RichTextPlugin=function({contentEditable:y,placeholder:v,ErrorBoundary:T}){let[O]=e.useLexicalComposerContext();return T=b(O,T),C(O),n.createElement(n.Fragment,null,y,n.createElement(_,{content:v}),T)},bp}process.env.NODE_ENV==="development"?y7():v7();var _p={},E_;function b7(){if(E_)return _p;E_=1;var e=dr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function o({ariaActiveDescendant:i,ariaAutoComplete:a,ariaControls:l,ariaDescribedBy:u,ariaExpanded:p,ariaLabel:m,ariaLabelledBy:b,ariaMultiline:C,ariaOwns:_,ariaRequired:y,autoCapitalize:v,className:T,id:O,role:R="textbox",spellCheck:k=!0,style:P,tabIndex:M,"data-testid":Y,...X}){const[oe]=e.useLexicalComposerContext(),[Z,K]=t.useState(!1),Q=t.useCallback(de=>{oe.setRootElement(de)},[oe]);return r(()=>(K(oe.isEditable()),oe.registerEditableListener(de=>{K(de)})),[oe]),t.createElement("div",n({},X,{"aria-activedescendant":Z?i:void 0,"aria-autocomplete":Z?a:"none","aria-controls":Z?l:void 0,"aria-describedby":u,"aria-expanded":Z&&R==="combobox"?!!p:void 0,"aria-label":m,"aria-labelledby":b,"aria-multiline":C,"aria-owns":Z?_:void 0,"aria-readonly":Z?void 0:!0,"aria-required":y,autoCapitalize:v,className:T,contentEditable:Z,"data-testid":Y,id:O,ref:Q,role:R,spellCheck:k,style:P,tabIndex:M}))}return _p.ContentEditable=o,_p}var xp={},C_;function _7(){if(C_)return xp;C_=1;var e=dr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i],l;for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return xp.ContentEditable=function({ariaActiveDescendant:o,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaExpanded:u,ariaLabel:p,ariaLabelledBy:m,ariaMultiline:b,ariaOwns:C,ariaRequired:_,autoCapitalize:y,className:v,id:T,role:O="textbox",spellCheck:R=!0,style:k,tabIndex:P,"data-testid":M,...Y}){let[X]=e.useLexicalComposerContext(),[oe,Z]=t.useState(!1),K=t.useCallback(Q=>{X.setRootElement(Q)},[X]);return r(()=>(Z(X.isEditable()),X.registerEditableListener(Q=>{Z(Q)})),[X]),t.createElement("div",n({},Y,{"aria-activedescendant":oe?o:void 0,"aria-autocomplete":oe?i:"none","aria-controls":oe?a:void 0,"aria-describedby":l,"aria-expanded":oe&&O==="combobox"?!!u:void 0,"aria-label":p,"aria-labelledby":m,"aria-multiline":b,"aria-owns":oe?C:void 0,"aria-readonly":oe?void 0:!0,"aria-required":_,autoCapitalize:y,className:v,contentEditable:oe,"data-testid":M,id:T,ref:K,role:O,spellCheck:R,style:k,tabIndex:P}))},xp}process.env.NODE_ENV==="development"?b7():_7();var Ep,w_;function x7(){if(w_)return Ep;w_=1;var e=H;function t(l,u){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},t(l,u)}function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,t(l,u)}var r=function(l,u){return l===void 0&&(l=[]),u===void 0&&(u=[]),l.length!==u.length||l.some(function(p,m){return!Object.is(p,u[m])})},o={error:null},i=function(l){n(u,l);function u(){for(var m,b=arguments.length,C=new Array(b),_=0;_<b;_++)C[_]=arguments[_];return m=l.call.apply(l,[this].concat(C))||this,m.state=o,m.resetErrorBoundary=function(){for(var y,v=arguments.length,T=new Array(v),O=0;O<v;O++)T[O]=arguments[O];m.props.onReset==null||(y=m.props).onReset.apply(y,T),m.reset()},m}u.getDerivedStateFromError=function(m){return{error:m}};var p=u.prototype;return p.reset=function(){this.setState(o)},p.componentDidCatch=function(m,b){var C,_;(C=(_=this.props).onError)==null||C.call(_,m,b)},p.componentDidUpdate=function(m,b){var C=this.state.error,_=this.props.resetKeys;if(C!==null&&b.error!==null&&r(m.resetKeys,_)){var y,v;(y=(v=this.props).onResetKeysChange)==null||y.call(v,m.resetKeys,_),this.reset()}},p.render=function(){var m=this.state.error,b=this.props,C=b.fallbackRender,_=b.FallbackComponent,y=b.fallback;if(m!==null){var v={error:m,resetErrorBoundary:this.resetErrorBoundary};if(e.isValidElement(y))return y;if(typeof C=="function")return C(v);if(_)return e.createElement(_,v);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},u}(e.Component);function a({children:l,onError:u}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:u},l)}return Ep=a,Ep}var Cp,T_;function E7(){if(T_)return Cp;T_=1;var e=H;function t(a,l){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},t(a,l)}function n(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,t(a,l)}function r(a,l){return a===void 0&&(a=[]),l===void 0&&(l=[]),a.length!==l.length||a.some(function(u,p){return!Object.is(u,l[p])})}var o={error:null},i=function(a){function l(){for(var p,m=arguments.length,b=Array(m),C=0;C<m;C++)b[C]=arguments[C];return p=a.call.apply(a,[this].concat(b))||this,p.state=o,p.resetErrorBoundary=function(){for(var _,y=arguments.length,v=Array(y),T=0;T<y;T++)v[T]=arguments[T];p.props.onReset==null||(_=p.props).onReset.apply(_,v),p.reset()},p}n(l,a),l.getDerivedStateFromError=function(p){return{error:p}};var u=l.prototype;return u.reset=function(){this.setState(o)},u.componentDidCatch=function(p,m){var b,C;(b=(C=this.props).onError)==null||b.call(C,p,m)},u.componentDidUpdate=function(p,m){var b=this.props.resetKeys;if(this.state.error!==null&&m.error!==null&&r(p.resetKeys,b)){var C,_;(C=(_=this.props).onResetKeysChange)==null||C.call(_,p.resetKeys,b),this.reset()}},u.render=function(){var p=this.state.error,m=this.props,b=m.fallbackRender,C=m.FallbackComponent;if(m=m.fallback,p!==null){if(p={error:p,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(m))return m;if(typeof b=="function")return b(p);if(C)return e.createElement(C,p);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},l}(e.Component);return Cp=function({children:a,onError:l}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:l},a)},Cp}process.env.NODE_ENV==="development"?x7():E7();var wp={},Dr={},N_;function C7(){if(N_)return Dr;N_=1;var e=Xt(),t=yn();function n(B){let W=1,J=B.getParent();for(;J!=null;){if(oe(J)){const F=J.getParent();if(fe(F)){W++,J=F.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return W}return W}function r(B){let W=B.getParent();if(!fe(W))throw Error("A ListItemNode must have a ListNode for a parent.");let J=W;for(;J!==null;)J=J.getParent(),fe(J)&&(W=J);return W}function o(B){let W=[];const J=B.getChildren().filter(oe);for(let F=0;F<J.length;F++){const w=J[F],N=w.getFirstChild();fe(N)?W=W.concat(o(N)):W.push(w)}return W}function i(B){return oe(B)&&fe(B.getFirstChild())}function a(B){let W=B;for(;W.getNextSibling()==null&&W.getPreviousSibling()==null;){const J=W.getParent();if(J==null||!(oe(W)||fe(W)))break;W=J}W.remove()}function l(B){return X().append(B)}function u(B,W){return oe(B)&&(W.length===0||W.length===1&&B.is(W[0])&&B.getChildrenSize()===0)}function p(B){const W=B.getParent();let J=1;if(W!=null)if(fe(W))J=W.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const F=B.getPreviousSiblings();for(let w=0;w<F.length;w++){const N=F[w];oe(N)&&!fe(N.getFirstChild())&&J++}return J}function m(B,W){B.update(()=>{const J=e.$getSelection();if(e.$INTERNAL_isPointSelection(J)){const F=J.getNodes(),w=J.anchor.getNode(),N=w.getParent();if(u(w,F)){const I=ne(W);if(e.$isRootOrShadowRoot(N)){w.replace(I);const q=X();e.$isElementNode(w)&&(q.setFormat(w.getFormatType()),q.setIndent(w.getIndent())),I.append(q)}else if(oe(w)){const q=w.getParentOrThrow();b(I,q.getChildren()),q.replace(I)}return}else{const I=new Set;for(let q=0;q<F.length;q++){const ue=F[q];if(e.$isElementNode(ue)&&ue.isEmpty()&&!oe(ue)&&!I.has(ue.getKey())){C(ue,W);continue}if(e.$isLeafNode(ue)){let he=ue.getParent();for(;he!=null;){const se=he.getKey();if(fe(he)){if(!I.has(se)){const Ce=ne(W);b(Ce,he.getChildren()),he.replace(Ce),v(Ce),I.add(se)}break}else{const Ce=he.getParent();if(e.$isRootOrShadowRoot(Ce)&&!I.has(se)){I.add(se),C(he,W);break}he=Ce}}}}}}})}function b(B,W){B.splice(B.getChildrenSize(),0,W)}function C(B,W){if(fe(B))return B;const J=B.getPreviousSibling(),F=B.getNextSibling(),w=X();if(w.setFormat(B.getFormatType()),w.setIndent(B.getIndent()),b(w,B.getChildren()),fe(J)&&W===J.getListType())return J.append(w),B.remove(),fe(F)&&W===F.getListType()&&(b(J,F.getChildren()),F.remove()),J;if(fe(F)&&W===F.getListType())return F.getFirstChildOrThrow().insertBefore(w),B.remove(),F;{const N=ne(W);return N.append(w),B.replace(N),v(N),N}}function _(B,W){const J=B.getLastChild(),F=W.getFirstChild();J&&F&&i(J)&&i(F)&&(_(J.getFirstChild(),F.getFirstChild()),F.remove());const w=W.getChildren();w.length>0&&(B.append(...w),v(B)),W.remove()}function y(B){B.update(()=>{const W=e.$getSelection();if(e.$isRangeSelection(W)){const J=new Set,F=W.getNodes(),w=W.anchor.getNode();if(u(w,F))J.add(r(w));else for(let N=0;N<F.length;N++){const I=F[N];if(e.$isLeafNode(I)){const q=t.$getNearestNodeOfType(I,k);q!=null&&J.add(r(q))}}for(const N of J){let I=N;const q=o(N);for(const ue of q){const he=e.$createParagraphNode();b(he,ue.getChildren()),I.insertAfter(he),I=he,ue.__key===W.anchor.key&&W.anchor.set(he.getKey(),0,"element"),ue.__key===W.focus.key&&W.focus.set(he.getKey(),0,"element"),ue.remove()}N.remove()}}})}function v(B,W){const J=W||B.getChildren();if(J!==void 0)for(let F=0;F<J.length;F++){const w=J[F];if(oe(w)){const N=w.getValue(),I=p(w);N!==I&&w.setValue(I)}}}function T(B){const W=new Set;if(i(B)||W.has(B.getKey()))return;const J=B.getParent(),F=B.getNextSibling(),w=B.getPreviousSibling();if(i(F)&&i(w)){const N=w.getFirstChild();if(fe(N)){N.append(B);const I=F.getFirstChild();if(fe(I)){const q=I.getChildren();b(N,q),F.remove(),W.add(F.getKey())}v(N)}}else if(i(F)){const N=F.getFirstChild();if(fe(N)){const I=N.getFirstChild();I!==null&&I.insertBefore(B),v(N)}}else if(i(w)){const N=w.getFirstChild();fe(N)&&(N.append(B),v(N))}else if(fe(J)){const N=X(),I=ne(J.getListType());N.append(I),I.append(B),w?w.insertAfter(N):F?F.insertBefore(N):J.append(N),v(I)}fe(J)&&v(J)}function O(B){if(i(B))return;const W=B.getParent(),J=W?W.getParent():void 0,F=J?J.getParent():void 0;if(fe(F)&&oe(J)&&fe(W)){const w=W?W.getFirstChild():void 0,N=W?W.getLastChild():void 0;if(B.is(w))J.insertBefore(B),W.isEmpty()&&J.remove();else if(B.is(N))J.insertAfter(B),W.isEmpty()&&J.remove();else{const I=W.getListType(),q=X(),ue=ne(I);q.append(ue),B.getPreviousSiblings().forEach(Ce=>ue.append(Ce));const he=X(),se=ne(I);he.append(se),b(se,B.getNextSiblings()),J.insertBefore(q),J.insertAfter(he),J.replace(B)}v(W),v(F)}}function R(){const B=e.$getSelection();if(!e.$isRangeSelection(B)||!B.isCollapsed())return!1;const W=B.anchor.getNode();if(!oe(W)||W.getChildrenSize()!==0)return!1;const J=r(W),F=W.getParent();if(!fe(F))throw Error("A ListItemNode must have a ListNode for a parent.");const w=F.getParent();let N;if(e.$isRootOrShadowRoot(w))N=e.$createParagraphNode(),J.insertAfter(N);else if(oe(w))N=X(),w.insertAfter(N);else return!1;N.select();const I=W.getNextSiblings();if(I.length>0){const q=ne(F.getListType());if(e.$isParagraphNode(N))N.insertAfter(q);else{const ue=X();ue.append(q),N.insertAfter(ue)}I.forEach(ue=>{ue.remove(),q.append(ue)})}return a(W),!0}class k extends e.ElementNode{static getType(){return"listitem"}static clone(W){return new k(W.__value,W.__checked,W.__key)}constructor(W,J,F){super(F),this.__value=W===void 0?1:W,this.__checked=J}createDOM(W){const J=document.createElement("li"),F=this.getParent();return fe(F)&&F.getListType()==="check"&&M(J,this,null),J.value=this.__value,P(J,W.theme,this),J}updateDOM(W,J,F){const w=this.getParent();return fe(w)&&w.getListType()==="check"&&M(J,this,W),J.value=this.__value,P(J,F.theme,this),!1}static transform(){return W=>{const J=W.getParent();fe(J)&&(v(J),J.getListType()!=="check"&&W.getChecked()!=null&&W.setChecked(void 0))}}static importDOM(){return{li:W=>({conversion:Y,priority:0})}}static importJSON(W){const J=X();return J.setChecked(W.checked),J.setValue(W.value),J.setFormat(W.format),J.setDirection(W.direction),J}exportDOM(W){const J=this.createDOM(W._config);return J.style.textAlign=this.getFormatType(),{element:J}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(e.$isElementNode(F)&&this.canMergeWith(F)){const w=F.getChildren();this.append(...w),F.remove()}else super.append(F)}return this}replace(W,J){if(oe(W))return super.replace(W);this.setIndent(0);const F=this.getParentOrThrow();if(!fe(F))return W;if(F.__first===this.getKey())F.insertBefore(W);else if(F.__last===this.getKey())F.insertAfter(W);else{const w=ne(F.getListType());let N=this.getNextSibling();for(;N;){const I=N;N=N.getNextSibling(),w.append(I)}F.insertAfter(W),W.insertAfter(w)}return J&&this.getChildren().forEach(w=>{W.append(w)}),this.remove(),F.getChildrenSize()===0&&F.remove(),W}insertAfter(W,J=!0){const F=this.getParentOrThrow();if(!fe(F))throw Error("insertAfter: list node is not parent of list item node");const w=this.getNextSiblings();if(oe(W)){const N=super.insertAfter(W,J),I=W.getParentOrThrow();return fe(I)&&v(I),N}if(fe(W)){let N=W;const I=W.getChildren();for(let q=I.length-1;q>=0;q--)N=I[q],this.insertAfter(N,J);return N}if(F.insertAfter(W,J),w.length!==0){const N=ne(F.getListType());w.forEach(I=>N.append(I)),W.insertAfter(N,J)}return W}remove(W){const J=this.getPreviousSibling(),F=this.getNextSibling();if(super.remove(W),J&&F&&i(J)&&i(F))_(J.getFirstChild(),F.getFirstChild()),F.remove();else if(F){const w=F.getParent();fe(w)&&v(w)}}insertNewAfter(W,J=!0){const F=X(this.__checked==null?void 0:!1);return this.insertAfter(F,J),F}collapseAtStart(W){const J=e.$createParagraphNode();this.getChildren().forEach(I=>J.append(I));const F=this.getParentOrThrow(),w=F.getParentOrThrow(),N=oe(w);if(F.getChildrenSize()===1)if(N)F.remove(),w.select();else{F.insertBefore(J),F.remove();const I=W.anchor,q=W.focus,ue=J.getKey();I.type==="element"&&I.getNode().is(this)&&I.set(ue,I.offset,"element"),q.type==="element"&&q.getNode().is(this)&&q.set(ue,q.offset,"element")}else F.insertBefore(J),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(W){const J=this.getWritable();J.__value=W}getChecked(){return this.getLatest().__checked}setChecked(W){const J=this.getWritable();J.__checked=W}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const W=this.getParent();if(W===null)return this.getLatest().__indent;let J=W.getParentOrThrow(),F=0;for(;oe(J);)J=J.getParentOrThrow().getParentOrThrow(),F++;return F}setIndent(W){if(!(typeof W=="number"&&W>-1))throw Error("Invalid indent value.");let J=this.getIndent();for(;J!==W;)J<W?(T(this),J++):(O(this),J--);return this}insertBefore(W){if(oe(W)){const J=this.getParentOrThrow();if(fe(J)){const F=this.getNextSiblings();v(J,F)}}return super.insertBefore(W)}canInsertAfter(W){return oe(W)}canReplaceWith(W){return oe(W)}canMergeWith(W){return e.$isParagraphNode(W)||oe(W)}extractWithChild(W,J){if(!e.$isRangeSelection(J))return!1;const F=J.anchor.getNode(),w=J.focus.getNode();return this.isParentOf(F)&&this.isParentOf(w)&&this.getTextContent().length===J.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return ne("bullet")}}function P(B,W,J){const F=[],w=[],N=W.list,I=N?N.listitem:void 0;let q;if(N&&N.nested&&(q=N.nested.listitem),I!==void 0){const ue=I.split(" ");F.push(...ue)}if(N){const ue=J.getParent(),he=fe(ue)&&ue.getListType()==="check",se=J.getChecked();(!he||se)&&w.push(N.listitemUnchecked),(!he||!se)&&w.push(N.listitemChecked),he&&F.push(se?N.listitemChecked:N.listitemUnchecked)}if(q!==void 0){const ue=q.split(" ");J.getChildren().some(he=>fe(he))?F.push(...ue):w.push(...ue)}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function M(B,W,J,F){fe(W.getFirstChild())?(B.removeAttribute("role"),B.removeAttribute("tabIndex"),B.removeAttribute("aria-checked")):(B.setAttribute("role","checkbox"),B.setAttribute("tabIndex","-1"),(!J||W.__checked!==J.__checked)&&B.setAttribute("aria-checked",W.getChecked()?"true":"false"))}function Y(B){const W=t.isHTMLElement(B)&&B.getAttribute("aria-checked")==="true";return{node:X(W)}}function X(B){return e.$applyNodeReplacement(new k(void 0,B))}function oe(B){return B instanceof k}class Z extends e.ElementNode{static getType(){return"list"}static clone(W){const J=W.__listType||pe[W.__tag];return new Z(J,W.__start,W.__key)}constructor(W,J,F){super(F);const w=pe[W]||W;this.__listType=w,this.__tag=w==="number"?"ol":"ul",this.__start=J}getTag(){return this.__tag}setListType(W){const J=this.getWritable();J.__listType=W,J.__tag=W==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(W,J){const F=this.__tag,w=document.createElement(F);return this.__start!==1&&w.setAttribute("start",String(this.__start)),w.__lexicalListType=this.__listType,K(w,W.theme,this),w}updateDOM(W,J,F){return W.__tag!==this.__tag?!0:(K(J,F.theme,this),!1)}static importDOM(){return{ol:W=>({conversion:de,priority:0}),ul:W=>({conversion:de,priority:0})}}static importJSON(W){const J=ne(W.listType,W.start);return J.setFormat(W.format),J.setIndent(W.indent),J.setDirection(W.direction),J}exportDOM(W){const{element:J}=super.exportDOM(W);return J&&t.isHTMLElement(J)&&(this.__start!==1&&J.setAttribute("start",String(this.__start)),this.__listType==="check"&&J.setAttribute("__lexicalListType","check")),{element:J}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(oe(F))super.append(F);else{const w=X();if(fe(F))w.append(F);else if(e.$isElementNode(F)){const N=e.$createTextNode(F.getTextContent());w.append(N)}else w.append(F);super.append(w)}}return v(this),this}extractWithChild(W){return oe(W)}}function K(B,W,J){const F=[],w=[],N=W.list;if(N!==void 0){const I=N[`${J.__tag}Depth`]||[],q=n(J)-1,ue=q%I.length,he=I[ue],se=N[J.__tag];let Ce;const Oe=N.nested;if(Oe!==void 0&&Oe.list&&(Ce=Oe.list),se!==void 0&&F.push(se),he!==void 0){const Be=he.split(" ");F.push(...Be);for(let ce=0;ce<I.length;ce++)ce!==ue&&w.push(J.__tag+ce)}if(Ce!==void 0){const Be=Ce.split(" ");q>1?F.push(...Be):w.push(...Be)}}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function Q(B){const W=[];for(let J=0;J<B.length;J++){const F=B[J];if(oe(F)){W.push(F);const w=F.getChildren();w.length>1&&w.forEach(N=>{fe(N)&&W.push(l(N))})}else W.push(l(F))}return W}function de(B){const W=B.nodeName.toLowerCase();let J=null;if(W==="ol"){const F=B.start;J=ne("number",F)}else W==="ul"&&(t.isHTMLElement(B)&&B.getAttribute("__lexicallisttype")==="check"?J=ne("check"):J=ne("bullet"));return{after:Q,node:J}}const pe={ol:"number",ul:"bullet"};function ne(B,W=1){return e.$applyNodeReplacement(new Z(B,W))}function fe(B){return B instanceof Z}const U=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),j=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),ee=e.createCommand("INSERT_CHECK_LIST_COMMAND"),re=e.createCommand("REMOVE_LIST_COMMAND");return Dr.$createListItemNode=X,Dr.$createListNode=ne,Dr.$getListDepth=n,Dr.$handleListInsertParagraph=R,Dr.$isListItemNode=oe,Dr.$isListNode=fe,Dr.INSERT_CHECK_LIST_COMMAND=ee,Dr.INSERT_ORDERED_LIST_COMMAND=j,Dr.INSERT_UNORDERED_LIST_COMMAND=U,Dr.ListItemNode=k,Dr.ListNode=Z,Dr.REMOVE_LIST_COMMAND=re,Dr.insertList=m,Dr.removeList=y,Dr}var kr={},S_;function w7(){if(S_)return kr;S_=1;var e=Xt(),t=yn();function n(U){let j=new URLSearchParams;j.append("code",U);for(let ee=1;ee<arguments.length;ee++)j.append("v",arguments[ee]);throw Error(`Minified Lexical error #${U}; visit https://lexical.dev/docs/error?${j} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(U){let j=1;for(U=U.getParent();U!=null;){if(P(U)){if(U=U.getParent(),Q(U)){j++,U=U.getParent();continue}n(40)}break}return j}function o(U){U=U.getParent(),Q(U)||n(40);let j=U;for(;j!==null;)j=j.getParent(),Q(j)&&(U=j);return U}function i(U){let j=[];U=U.getChildren().filter(P);for(let ee=0;ee<U.length;ee++){let re=U[ee],B=re.getFirstChild();Q(B)?j=j.concat(i(B)):j.push(re)}return j}function a(U){return P(U)&&Q(U.getFirstChild())}function l(U){for(;U.getNextSibling()==null&&U.getPreviousSibling()==null;){let j=U.getParent();if(j==null||!P(U)&&!Q(U))break;U=j}U.remove()}function u(U){return k().append(U)}function p(U,j){return P(U)&&(j.length===0||j.length===1&&U.is(j[0])&&U.getChildrenSize()===0)}function m(U,j){U.splice(U.getChildrenSize(),0,j)}function b(U,j){if(Q(U))return U;let ee=U.getPreviousSibling(),re=U.getNextSibling(),B=k();return B.setFormat(U.getFormatType()),B.setIndent(U.getIndent()),m(B,U.getChildren()),Q(ee)&&j===ee.getListType()?(ee.append(B),U.remove(),Q(re)&&j===re.getListType()&&(m(ee,re.getChildren()),re.remove()),ee):Q(re)&&j===re.getListType()?(re.getFirstChildOrThrow().insertBefore(B),U.remove(),re):(j=K(j),j.append(B),U.replace(j),_(j),j)}function C(U,j){var ee=U.getLastChild();let re=j.getFirstChild();ee&&re&&a(ee)&&a(re)&&(C(ee.getFirstChild(),re.getFirstChild()),re.remove()),ee=j.getChildren(),0<ee.length&&(U.append(...ee),_(U)),j.remove()}function _(U,j){if(U=j||U.getChildren(),U!==void 0)for(j=0;j<U.length;j++){let W=U[j];if(P(W)){let J=W.getValue();var ee=W,re=ee.getParent(),B=1;for(re!=null&&(Q(re)?B=re.getStart():n(44)),ee=ee.getPreviousSiblings(),re=0;re<ee.length;re++){let F=ee[re];P(F)&&!Q(F.getFirstChild())&&B++}J!==B&&W.setValue(B)}}}function y(U){if(!a(U)){var j=U.getParent(),ee=j?j.getParent():void 0,re=ee?ee.getParent():void 0;if(Q(re)&&P(ee)&&Q(j)){var B=j?j.getFirstChild():void 0,W=j?j.getLastChild():void 0;if(U.is(B))ee.insertBefore(U),j.isEmpty()&&ee.remove();else if(U.is(W))ee.insertAfter(U),j.isEmpty()&&ee.remove();else{var J=j.getListType();B=k();let F=K(J);B.append(F),U.getPreviousSiblings().forEach(w=>F.append(w)),W=k(),J=K(J),W.append(J),m(J,U.getNextSiblings()),ee.insertBefore(B),ee.insertAfter(W),ee.replace(U)}_(j),_(re)}}}class v extends e.ElementNode{static getType(){return"listitem"}static clone(j){return new v(j.__value,j.__checked,j.__key)}constructor(j,ee,re){super(re),this.__value=j===void 0?1:j,this.__checked=ee}createDOM(j){let ee=document.createElement("li"),re=this.getParent();return Q(re)&&re.getListType()==="check"&&O(ee,this,null),ee.value=this.__value,T(ee,j.theme,this),ee}updateDOM(j,ee,re){let B=this.getParent();return Q(B)&&B.getListType()==="check"&&O(ee,this,j),ee.value=this.__value,T(ee,re.theme,this),!1}static transform(){return j=>{let ee=j.getParent();Q(ee)&&(_(ee),ee.getListType()!=="check"&&j.getChecked()!=null&&j.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:R,priority:0})}}static importJSON(j){let ee=k();return ee.setChecked(j.checked),ee.setValue(j.value),ee.setFormat(j.format),ee.setDirection(j.direction),ee}exportDOM(j){return j=this.createDOM(j._config),j.style.textAlign=this.getFormatType(),{element:j}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...j){for(let ee=0;ee<j.length;ee++){let re=j[ee];if(e.$isElementNode(re)&&this.canMergeWith(re)){let B=re.getChildren();this.append(...B),re.remove()}else super.append(re)}return this}replace(j,ee){if(P(j))return super.replace(j);this.setIndent(0);let re=this.getParentOrThrow();if(!Q(re))return j;if(re.__first===this.getKey())re.insertBefore(j);else if(re.__last===this.getKey())re.insertAfter(j);else{let B=K(re.getListType()),W=this.getNextSibling();for(;W;){let J=W;W=W.getNextSibling(),B.append(J)}re.insertAfter(j),j.insertAfter(B)}return ee&&this.getChildren().forEach(B=>{j.append(B)}),this.remove(),re.getChildrenSize()===0&&re.remove(),j}insertAfter(j,ee=!0){var re=this.getParentOrThrow();Q(re)||n(39);var B=this.getNextSiblings();if(P(j))return ee=super.insertAfter(j,ee),j=j.getParentOrThrow(),Q(j)&&_(j),ee;if(Q(j)){for(re=j,j=j.getChildren(),B=j.length-1;0<=B;B--)re=j[B],this.insertAfter(re,ee);return re}if(re.insertAfter(j,ee),B.length!==0){let W=K(re.getListType());B.forEach(J=>W.append(J)),j.insertAfter(W,ee)}return j}remove(j){let ee=this.getPreviousSibling(),re=this.getNextSibling();super.remove(j),ee&&re&&a(ee)&&a(re)?(C(ee.getFirstChild(),re.getFirstChild()),re.remove()):re&&(j=re.getParent(),Q(j)&&_(j))}insertNewAfter(j,ee=!0){return j=k(this.__checked==null?void 0:!1),this.insertAfter(j,ee),j}collapseAtStart(j){let ee=e.$createParagraphNode();this.getChildren().forEach(J=>ee.append(J));var re=this.getParentOrThrow(),B=re.getParentOrThrow();let W=P(B);return re.getChildrenSize()===1?W?(re.remove(),B.select()):(re.insertBefore(ee),re.remove(),re=j.anchor,j=j.focus,B=ee.getKey(),re.type==="element"&&re.getNode().is(this)&&re.set(B,re.offset,"element"),j.type==="element"&&j.getNode().is(this)&&j.set(B,j.offset,"element")):(re.insertBefore(ee),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(j){this.getWritable().__value=j}getChecked(){return this.getLatest().__checked}setChecked(j){this.getWritable().__checked=j}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var j=this.getParent();if(j===null)return this.getLatest().__indent;j=j.getParentOrThrow();let ee=0;for(;P(j);)j=j.getParentOrThrow().getParentOrThrow(),ee++;return ee}setIndent(j){typeof j=="number"&&-1<j||n(117);let ee=this.getIndent();for(;ee!==j;)if(ee<j){e:{var re=new Set;if(a(this)||re.has(this.getKey()))break e;let F=this.getParent();var B=this.getNextSibling(),W=this.getPreviousSibling();if(a(B)&&a(W)){if(W=W.getFirstChild(),Q(W)){W.append(this);var J=B.getFirstChild();Q(J)&&(J=J.getChildren(),m(W,J),B.remove(),re.add(B.getKey())),_(W)}}else a(B)?(B=B.getFirstChild(),Q(B)&&(re=B.getFirstChild(),re!==null&&re.insertBefore(this),_(B))):a(W)?(B=W.getFirstChild(),Q(B)&&(B.append(this),_(B))):Q(F)&&(re=k(),J=K(F.getListType()),re.append(J),J.append(this),W?W.insertAfter(re):B?B.insertBefore(re):F.append(re),_(J));Q(F)&&_(F)}ee++}else y(this),ee--;return this}insertBefore(j){if(P(j)){let ee=this.getParentOrThrow();if(Q(ee)){let re=this.getNextSiblings();_(ee,re)}}return super.insertBefore(j)}canInsertAfter(j){return P(j)}canReplaceWith(j){return P(j)}canMergeWith(j){return e.$isParagraphNode(j)||P(j)}extractWithChild(j,ee){if(!e.$isRangeSelection(ee))return!1;j=ee.anchor.getNode();let re=ee.focus.getNode();return this.isParentOf(j)&&this.isParentOf(re)&&this.getTextContent().length===ee.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return K("bullet")}}function T(U,j,ee){let re=[],B=[];var W=(j=j.list)?j.listitem:void 0;if(j&&j.nested)var J=j.nested.listitem;if(W!==void 0&&(W=W.split(" "),re.push(...W)),j){W=ee.getParent(),W=Q(W)&&W.getListType()==="check";let F=ee.getChecked();W&&!F||B.push(j.listitemUnchecked),W&&F||B.push(j.listitemChecked),W&&re.push(F?j.listitemChecked:j.listitemUnchecked)}J!==void 0&&(J=J.split(" "),ee.getChildren().some(F=>Q(F))?re.push(...J):B.push(...J)),0<B.length&&t.removeClassNamesFromElement(U,...B),0<re.length&&t.addClassNamesToElement(U,...re)}function O(U,j,ee){Q(j.getFirstChild())?(U.removeAttribute("role"),U.removeAttribute("tabIndex"),U.removeAttribute("aria-checked")):(U.setAttribute("role","checkbox"),U.setAttribute("tabIndex","-1"),ee&&j.__checked===ee.__checked||U.setAttribute("aria-checked",j.getChecked()?"true":"false"))}function R(U){return U=t.isHTMLElement(U)&&U.getAttribute("aria-checked")==="true",{node:k(U)}}function k(U){return e.$applyNodeReplacement(new v(void 0,U))}function P(U){return U instanceof v}class M extends e.ElementNode{static getType(){return"list"}static clone(j){return new M(j.__listType||Z[j.__tag],j.__start,j.__key)}constructor(j,ee,re){super(re),this.__listType=j=Z[j]||j,this.__tag=j==="number"?"ol":"ul",this.__start=ee}getTag(){return this.__tag}setListType(j){let ee=this.getWritable();ee.__listType=j,ee.__tag=j==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(j){let ee=document.createElement(this.__tag);return this.__start!==1&&ee.setAttribute("start",String(this.__start)),ee.__lexicalListType=this.__listType,Y(ee,j.theme,this),ee}updateDOM(j,ee,re){return j.__tag!==this.__tag?!0:(Y(ee,re.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:oe,priority:0}),ul:()=>({conversion:oe,priority:0})}}static importJSON(j){let ee=K(j.listType,j.start);return ee.setFormat(j.format),ee.setIndent(j.indent),ee.setDirection(j.direction),ee}exportDOM(j){return{element:j}=super.exportDOM(j),j&&t.isHTMLElement(j)&&(this.__start!==1&&j.setAttribute("start",String(this.__start)),this.__listType==="check"&&j.setAttribute("__lexicalListType","check")),{element:j}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...j){for(let re=0;re<j.length;re++){var ee=j[re];if(P(ee))super.append(ee);else{let B=k();Q(ee)||e.$isElementNode(ee)&&(ee=e.$createTextNode(ee.getTextContent())),B.append(ee),super.append(B)}}return _(this),this}extractWithChild(j){return P(j)}}function Y(U,j,ee){let re=[],B=[];var W=j.list;if(W!==void 0){let F=W[`${ee.__tag}Depth`]||[];j=r(ee)-1;let w=j%F.length;var J=F[w];let N=W[ee.__tag],I;if(W=W.nested,W!==void 0&&W.list&&(I=W.list),N!==void 0&&re.push(N),J!==void 0)for(J=J.split(" "),re.push(...J),J=0;J<F.length;J++)J!==w&&B.push(ee.__tag+J);I!==void 0&&(ee=I.split(" "),1<j?re.push(...ee):B.push(...ee))}0<B.length&&t.removeClassNamesFromElement(U,...B),0<re.length&&t.addClassNamesToElement(U,...re)}function X(U){let j=[];for(let re=0;re<U.length;re++){var ee=U[re];P(ee)?(j.push(ee),ee=ee.getChildren(),1<ee.length&&ee.forEach(B=>{Q(B)&&j.push(u(B))})):j.push(u(ee))}return j}function oe(U){let j=U.nodeName.toLowerCase(),ee=null;return j==="ol"?ee=K("number",U.start):j==="ul"&&(ee=t.isHTMLElement(U)&&U.getAttribute("__lexicallisttype")==="check"?K("check"):K("bullet")),{after:X,node:ee}}let Z={ol:"number",ul:"bullet"};function K(U,j=1){return e.$applyNodeReplacement(new M(U,j))}function Q(U){return U instanceof M}let de=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),pe=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),ne=e.createCommand("INSERT_CHECK_LIST_COMMAND"),fe=e.createCommand("REMOVE_LIST_COMMAND");return kr.$createListItemNode=k,kr.$createListNode=K,kr.$getListDepth=r,kr.$handleListInsertParagraph=function(){var U=e.$getSelection();if(!e.$isRangeSelection(U)||!U.isCollapsed()||(U=U.anchor.getNode(),!P(U)||U.getChildrenSize()!==0))return!1;var j=o(U),ee=U.getParent();Q(ee)||n(40);let re=ee.getParent(),B;if(e.$isRootOrShadowRoot(re))B=e.$createParagraphNode(),j.insertAfter(B);else if(P(re))B=k(),re.insertAfter(B);else return!1;if(B.select(),j=U.getNextSiblings(),0<j.length){let W=K(ee.getListType());e.$isParagraphNode(B)?B.insertAfter(W):(ee=k(),ee.append(W),B.insertAfter(ee)),j.forEach(J=>{J.remove(),W.append(J)})}return l(U),!0},kr.$isListItemNode=P,kr.$isListNode=Q,kr.INSERT_CHECK_LIST_COMMAND=ne,kr.INSERT_ORDERED_LIST_COMMAND=pe,kr.INSERT_UNORDERED_LIST_COMMAND=de,kr.ListItemNode=v,kr.ListNode=M,kr.REMOVE_LIST_COMMAND=fe,kr.insertList=function(U,j){U.update(()=>{var ee=e.$getSelection();if(e.$INTERNAL_isPointSelection(ee)){var re=ee.getNodes();ee=ee.anchor.getNode();var B=ee.getParent();if(p(ee,re))re=K(j),e.$isRootOrShadowRoot(B)?(ee.replace(re),B=k(),e.$isElementNode(ee)&&(B.setFormat(ee.getFormatType()),B.setIndent(ee.getIndent())),re.append(B)):P(ee)&&(ee=ee.getParentOrThrow(),m(re,ee.getChildren()),ee.replace(re));else for(ee=new Set,B=0;B<re.length;B++){var W=re[B];if(e.$isElementNode(W)&&W.isEmpty()&&!P(W)&&!ee.has(W.getKey()))b(W,j);else if(e.$isLeafNode(W))for(W=W.getParent();W!=null;){let F=W.getKey();if(Q(W)){if(!ee.has(F)){var J=K(j);m(J,W.getChildren()),W.replace(J),_(J),ee.add(F)}break}else{if(J=W.getParent(),e.$isRootOrShadowRoot(J)&&!ee.has(F)){ee.add(F),b(W,j);break}W=J}}}}})},kr.removeList=function(U){U.update(()=>{let j=e.$getSelection();if(e.$isRangeSelection(j)){var ee=new Set,re=j.getNodes(),B=j.anchor.getNode();if(p(B,re))ee.add(o(B));else for(B=0;B<re.length;B++){var W=re[B];e.$isLeafNode(W)&&(W=t.$getNearestNodeOfType(W,v),W!=null&&ee.add(o(W)))}for(let J of ee){ee=J,re=i(J);for(let F of re)re=e.$createParagraphNode(),m(re,F.getChildren()),ee.insertAfter(re),ee=re,F.__key===j.anchor.key&&j.anchor.set(re.getKey(),0,"element"),F.__key===j.focus.key&&j.focus.set(re.getKey(),0,"element"),F.remove();J.remove()}}})},kr}var O_,A_;function iy(){return A_||(A_=1,O_=process.env.NODE_ENV==="development"?C7():w7()),O_}var R_;function T7(){if(R_)return wp;R_=1;var e=iy(),t=dr(),n=H,r=yn(),o=Xt();function i(l){n.useEffect(()=>r.mergeRegister(l.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(l,"number"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(l,"bullet"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(l),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[l])}function a(){const[l]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!l.hasNodes([e.ListNode,e.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[l]),i(l),null}return wp.ListPlugin=a,wp}var Tp={},$_;function N7(){if($_)return Tp;$_=1;var e=iy(),t=dr(),n=H,r=yn(),o=Xt();function i(a){n.useEffect(()=>r.mergeRegister(a.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(a,"number"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(a,"bullet"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(a),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[a])}return Tp.ListPlugin=function(){let[a]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!a.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[a]),i(a),null},Tp}process.env.NODE_ENV==="development"?T7():N7();var Np={},mi={},D_;function S7(){if(D_)return mi;D_=1;var e=yn(),t=Xt();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(y){return new r(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}constructor(y,v={},T){super(T);const{target:O=null,rel:R=null,title:k=null}=v;this.__url=y,this.__target=O,this.__rel=R,this.__title=k}createDOM(y){const v=document.createElement("a");return v.href=this.sanitizeUrl(this.__url),this.__target!==null&&(v.target=this.__target),this.__rel!==null&&(v.rel=this.__rel),this.__title!==null&&(v.title=this.__title),e.addClassNamesToElement(v,y.theme.link),v}updateDOM(y,v,T){const O=this.__url,R=this.__target,k=this.__rel,P=this.__title;return O!==y.__url&&(v.href=O),R!==y.__target&&(R?v.target=R:v.removeAttribute("target")),k!==y.__rel&&(k?v.rel=k:v.removeAttribute("rel")),P!==y.__title&&(P?v.title=P:v.removeAttribute("title")),!1}static importDOM(){return{a:y=>({conversion:o,priority:1})}}static importJSON(y){const v=i(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}sanitizeUrl(y){try{const v=new URL(y);if(!n.has(v.protocol))return"about:blank"}catch{return y}return y}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(y){const v=this.getWritable();v.__url=y}getTarget(){return this.getLatest().__target}setTarget(y){const v=this.getWritable();v.__target=y}getRel(){return this.getLatest().__rel}setRel(y){const v=this.getWritable();v.__rel=y}getTitle(){return this.getLatest().__title}setTitle(y){const v=this.getWritable();v.__title=y}insertNewAfter(y,v=!0){const T=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(T,v),T}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(y,v,T){if(!t.$isRangeSelection(v))return!1;const O=v.anchor.getNode(),R=v.focus.getNode();return this.isParentOf(O)&&this.isParentOf(R)&&v.getTextContent().length>0}}function o(_){let y=null;if(e.isHTMLAnchorElement(_)){const v=_.textContent;(v!==null&&v!==""||_.children.length>0)&&(y=i(_.getAttribute("href")||"",{rel:_.getAttribute("rel"),target:_.getAttribute("target"),title:_.getAttribute("title")}))}return{node:y}}function i(_,y){return t.$applyNodeReplacement(new r(_,y))}function a(_){return _ instanceof r}class l extends r{static getType(){return"autolink"}static clone(y){return new l(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}static importJSON(y){const v=u(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(y,v=!0){const T=this.getParentOrThrow().insertNewAfter(y,v);if(t.$isElementNode(T)){const O=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return T.append(O),O}return null}}function u(_,y){return t.$applyNodeReplacement(new l(_,y))}function p(_){return _ instanceof l}const m=t.createCommand("TOGGLE_LINK_COMMAND");function b(_,y={}){const{target:v,title:T}=y,O=y.rel===void 0?"noreferrer":y.rel,R=t.$getSelection();if(!t.$isRangeSelection(R))return;const k=R.extract();if(_===null)k.forEach(P=>{const M=P.getParent();if(a(M)){const Y=M.getChildren();for(let X=0;X<Y.length;X++)M.insertBefore(Y[X]);M.remove()}});else{if(k.length===1){const Y=k[0],X=C(Y,a);if(X!==null){X.setURL(_),v!==void 0&&X.setTarget(v),O!==null&&X.setRel(O),T!==void 0&&X.setTitle(T);return}}let P=null,M=null;k.forEach(Y=>{const X=Y.getParent();if(!(X===M||X===null||t.$isElementNode(Y)&&!Y.isInline())){if(a(X)){M=X,X.setURL(_),v!==void 0&&X.setTarget(v),O!==null&&M.setRel(O),T!==void 0&&M.setTitle(T);return}if(X.is(P)||(P=X,M=i(_,{rel:O,target:v,title:T}),a(X)?Y.getPreviousSibling()===null?X.insertBefore(M):X.insertAfter(M):Y.insertBefore(M)),a(Y)){if(Y.is(M))return;if(M!==null){const oe=Y.getChildren();for(let Z=0;Z<oe.length;Z++)M.append(oe[Z])}Y.remove();return}M!==null&&M.append(Y)}})}}function C(_,y){let v=_;for(;v!==null&&v.getParent()!==null&&!y(v);)v=v.getParentOrThrow();return y(v)?v:null}return mi.$createAutoLinkNode=u,mi.$createLinkNode=i,mi.$isAutoLinkNode=p,mi.$isLinkNode=a,mi.AutoLinkNode=l,mi.LinkNode=r,mi.TOGGLE_LINK_COMMAND=m,mi.toggleLink=b,mi}var yi={},k_;function O7(){if(k_)return yi;k_=1;var e=yn(),t=Xt();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(C){return new r(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}constructor(C,_={},y){super(y);let{target:v=null,rel:T=null,title:O=null}=_;this.__url=C,this.__target=v,this.__rel=T,this.__title=O}createDOM(C){let _=document.createElement("a");return _.href=this.sanitizeUrl(this.__url),this.__target!==null&&(_.target=this.__target),this.__rel!==null&&(_.rel=this.__rel),this.__title!==null&&(_.title=this.__title),e.addClassNamesToElement(_,C.theme.link),_}updateDOM(C,_){let y=this.__url,v=this.__target,T=this.__rel,O=this.__title;return y!==C.__url&&(_.href=y),v!==C.__target&&(v?_.target=v:_.removeAttribute("target")),T!==C.__rel&&(T?_.rel=T:_.removeAttribute("rel")),O!==C.__title&&(O?_.title=O:_.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(C){let _=i(C.url,{rel:C.rel,target:C.target,title:C.title});return _.setFormat(C.format),_.setIndent(C.indent),_.setDirection(C.direction),_}sanitizeUrl(C){try{let _=new URL(C);if(!n.has(_.protocol))return"about:blank"}catch{}return C}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(C){this.getWritable().__url=C}getTarget(){return this.getLatest().__target}setTarget(C){this.getWritable().__target=C}getRel(){return this.getLatest().__rel}setRel(C){this.getWritable().__rel=C}getTitle(){return this.getLatest().__title}setTitle(C){this.getWritable().__title=C}insertNewAfter(C,_=!0){return C=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(C,_),C}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(C,_){if(!t.$isRangeSelection(_))return!1;C=_.anchor.getNode();let y=_.focus.getNode();return this.isParentOf(C)&&this.isParentOf(y)&&0<_.getTextContent().length}}function o(b){let C=null;if(e.isHTMLAnchorElement(b)){let _=b.textContent;(_!==null&&_!==""||0<b.children.length)&&(C=i(b.getAttribute("href")||"",{rel:b.getAttribute("rel"),target:b.getAttribute("target"),title:b.getAttribute("title")}))}return{node:C}}function i(b,C){return t.$applyNodeReplacement(new r(b,C))}function a(b){return b instanceof r}class l extends r{static getType(){return"autolink"}static clone(C){return new l(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}static importJSON(C){let _=u(C.url,{rel:C.rel,target:C.target,title:C.title});return _.setFormat(C.format),_.setIndent(C.indent),_.setDirection(C.direction),_}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(C,_=!0){return C=this.getParentOrThrow().insertNewAfter(C,_),t.$isElementNode(C)?(_=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),C.append(_),_):null}}function u(b,C){return t.$applyNodeReplacement(new l(b,C))}let p=t.createCommand("TOGGLE_LINK_COMMAND");function m(b,C){for(;b!==null&&b.getParent()!==null&&!C(b);)b=b.getParentOrThrow();return C(b)?b:null}return yi.$createAutoLinkNode=u,yi.$createLinkNode=i,yi.$isAutoLinkNode=function(b){return b instanceof l},yi.$isLinkNode=a,yi.AutoLinkNode=l,yi.LinkNode=r,yi.TOGGLE_LINK_COMMAND=p,yi.toggleLink=function(b,C={}){let{target:_,title:y}=C,v=C.rel===void 0?"noreferrer":C.rel;if(C=t.$getSelection(),t.$isRangeSelection(C))if(C=C.extract(),b===null)C.forEach(T=>{if(T=T.getParent(),a(T)){let O=T.getChildren();for(let R=0;R<O.length;R++)T.insertBefore(O[R]);T.remove()}});else{if(C.length===1){let R=m(C[0],a);if(R!==null){R.setURL(b),_!==void 0&&R.setTarget(_),v!==null&&R.setRel(v),y!==void 0&&R.setTitle(y);return}}let T=null,O=null;C.forEach(R=>{var k=R.getParent();if(k!==O&&k!==null&&(!t.$isElementNode(R)||R.isInline()))if(a(k))O=k,k.setURL(b),_!==void 0&&k.setTarget(_),v!==null&&O.setRel(v),y!==void 0&&O.setTitle(y);else if(k.is(T)||(T=k,O=i(b,{rel:v,target:_,title:y}),a(k)?R.getPreviousSibling()===null?k.insertBefore(O):k.insertAfter(O):R.insertBefore(O)),a(R)){if(!R.is(O)){if(O!==null){k=R.getChildren();for(let P=0;P<k.length;P++)O.append(k[P])}R.remove()}}else O!==null&&O.append(R)})}},yi}var M_,P_;function ay(){return P_||(P_=1,M_=process.env.NODE_ENV==="development"?S7():O7()),M_}var I_;function A7(){if(I_)return Np;I_=1;var e=ay(),t=dr(),n=yn(),r=Xt(),o=H;function i({validateUrl:a}){const[l]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!l.hasNodes([e.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(l.registerCommand(e.TOGGLE_LINK_COMMAND,u=>{if(u===null)return e.toggleLink(u),!0;if(typeof u=="string")return a===void 0||a(u)?(e.toggleLink(u),!0):!1;{const{url:p,target:m,rel:b,title:C}=u;return e.toggleLink(p,{rel:b,target:m,title:C}),!0}},r.COMMAND_PRIORITY_LOW),a!==void 0?l.registerCommand(r.PASTE_COMMAND,u=>{const p=r.$getSelection();if(!r.$isRangeSelection(p)||p.isCollapsed()||!(u instanceof ClipboardEvent)||u.clipboardData==null)return!1;const m=u.clipboardData.getData("text");return a(m)?p.getNodes().some(b=>r.$isElementNode(b))?!1:(l.dispatchCommand(e.TOGGLE_LINK_COMMAND,m),u.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[l,a]),null}return Np.LinkPlugin=i,Np}var Sp={},L_;function R7(){if(L_)return Sp;L_=1;var e=ay(),t=dr(),n=yn(),r=Xt(),o=H;return Sp.LinkPlugin=function({validateUrl:i}){let[a]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,l=>{if(l===null)return e.toggleLink(l),!0;if(typeof l=="string")return i===void 0||i(l)?(e.toggleLink(l),!0):!1;let{url:u,target:p,rel:m,title:b}=l;return e.toggleLink(u,{rel:m,target:p,title:b}),!0},r.COMMAND_PRIORITY_LOW),i!==void 0?a.registerCommand(r.PASTE_COMMAND,l=>{let u=r.$getSelection();if(!r.$isRangeSelection(u)||u.isCollapsed()||!(l instanceof ClipboardEvent)||l.clipboardData==null)return!1;let p=l.clipboardData.getData("text");return i(p)?u.getNodes().some(m=>r.$isElementNode(m))?!1:(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,p),l.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[a,i]),null},Sp}process.env.NODE_ENV==="development"?A7():R7();var Op={},tn={},F_;function $7(){if(F_)return tn;F_=1;var e=Xt(),t=yn();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(me){const _e=new o(me.__headerState,me.__colSpan,me.__width,me.__key);return _e.__rowSpan=me.__rowSpan,_e.__backgroundColor=me.__backgroundColor,_e}static importDOM(){return{td:me=>({conversion:i,priority:0}),th:me=>({conversion:i,priority:0})}}static importJSON(me){const _e=me.colSpan||1,De=me.rowSpan||1,Fe=a(me.headerState,_e,me.width||void 0);return Fe.__rowSpan=De,Fe.__backgroundColor=me.backgroundColor||null,Fe}constructor(me=r.NO_STATUS,_e=1,De,Fe){super(_e,Fe),this.__headerState=me,this.__width=De,this.__backgroundColor=null}createDOM(me){const _e=document.createElement(this.getTag());return this.__width&&(_e.style.width=`${this.__width}px`),this.__colSpan>1&&(_e.colSpan=this.__colSpan),this.__rowSpan>1&&(_e.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(_e.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(_e,me.theme.tableCell,this.hasHeader()&&me.theme.tableCellHeader),_e}exportDOM(me){const{element:_e}=super.exportDOM(me);if(_e){const De=_e,Fe=700,ke=this.getParentOrThrow().getChildrenSize();De.style.border="1px solid black",this.__colSpan>1&&(De.colSpan=this.__colSpan),this.__rowSpan>1&&(De.rowSpan=this.__rowSpan),De.style.width=`${this.getWidth()||Math.max(90,Fe/ke)}px`,De.style.verticalAlign="top",De.style.textAlign="start";const ze=this.getBackgroundColor();ze!==null?De.style.backgroundColor=ze:this.hasHeader()&&(De.style.backgroundColor="#f2f3f5")}return{element:_e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(me){const _e=this.getWritable();return _e.__headerState=me,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(me){const _e=this.getWritable();return _e.__width=me,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(me){this.getWritable().__backgroundColor=me}toggleHeaderStyle(me){const _e=this.getWritable();return(_e.__headerState&me)===me?_e.__headerState-=me:_e.__headerState+=me,_e}hasHeaderState(me){return(this.getHeaderStyles()&me)===me}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(me){return me.__headerState!==this.__headerState||me.__width!==this.__width||me.__colSpan!==this.__colSpan||me.__rowSpan!==this.__rowSpan||me.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(Se){const me=Se,_e=Se.nodeName.toLowerCase();let De;n.test(me.style.width)&&(De=parseFloat(me.style.width));const Fe=a(_e==="th"?r.ROW:r.NO_STATUS,me.colSpan,De);Fe.__rowSpan=me.rowSpan;const ke=me.style.backgroundColor;return ke!==""&&(Fe.__backgroundColor=ke),{forChild:(ze,tt)=>{if(l(tt)&&!e.$isElementNode(ze)){const ut=e.$createParagraphNode();return e.$isLineBreakNode(ze)&&ze.getTextContent()===`
274
- `?null:(ut.append(ze),ut)}return ze},node:Fe}}function a(Se,me=1,_e){return e.$applyNodeReplacement(new o(Se,me,_e))}function l(Se){return Se instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(me){return new u(me.__height,me.__key)}static importDOM(){return{tr:me=>({conversion:p,priority:0})}}static importJSON(me){return m(me.height)}constructor(me,_e){super(_e),this.__height=me}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(me){const _e=document.createElement("tr");return this.__height&&(_e.style.height=`${this.__height}px`),t.addClassNamesToElement(_e,me.theme.tableRow),_e}isShadowRoot(){return!0}setHeight(me){const _e=this.getWritable();return _e.__height=me,this.__height}getHeight(){return this.getLatest().__height}updateDOM(me){return me.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(Se){const me=Se;let _e;return n.test(me.style.height)&&(_e=parseFloat(me.style.height)),{node:m(_e)}}function m(Se){return e.$applyNodeReplacement(new u(Se))}function b(Se){return Se instanceof u}const C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=Se=>C?(Se||window).getSelection():null;class y{constructor(me,_e){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=_e,this.editor=me,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(me=>me())}trackTableGrid(){const me=new MutationObserver(_e=>{this.editor.update(()=>{let De=!1;for(let ke=0;ke<_e.length;ke++){const ze=_e[ke].target.nodeName;if(ze==="TABLE"||ze==="TR"){De=!0;break}}if(!De)return;const Fe=this.editor.getElementByKey(this.tableNodeKey);if(!Fe)throw new Error("Expected to find TableElement in DOM");this.grid=P(Fe)})});this.editor.update(()=>{const _e=this.editor.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");this.grid=P(_e),me.observe(_e,{childList:!0,subtree:!0})})}clearHighlight(){const me=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=me.getElementByKey(this.tableNodeKey);if(!De)throw new Error("Expected to find TableElement in DOM");const Fe=P(De);M(me,Fe,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(_e,me._config.theme.tableSelection),_e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.addClassNamesToElement(_e,me._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(me){if(me!=null&&me.gridKey===this.tableNodeKey){const _e=this.editor;this.gridSelection=me,this.isHighlightingCells=!0,this.disableHighlightStyle(),M(_e,this.grid,this.gridSelection)}else me==null?this.clearHighlight():(this.tableNodeKey=me.gridKey,this.updateTableGridSelection(me))}setFocusCellForSelection(me,_e=!1){const De=this.editor;De.update(()=>{const Fe=e.$getNodeByKey(this.tableNodeKey);if(!w(Fe))throw new Error("Expected TableNode.");if(!De.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const ke=me.x,ze=me.y;if(this.focusCell=me,this.anchorCell!==null){const tt=_(De._window);tt&&tt.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ke||this.anchorY!==ze||_e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ke===this.focusX&&ze===this.focusY)return;if(this.focusX=ke,this.focusY=ze,this.isHighlightingCells){const tt=e.$getNearestNodeFromDOMNode(me.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(tt)){const ut=tt.getKey();this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ut,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),De.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),M(De,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(me){this.isHighlightingCells=!1,this.anchorCell=me,this.anchorX=me.x,this.anchorY=me.y,this.editor.update(()=>{const _e=e.$getNearestNodeFromDOMNode(me.elem);if(l(_e)){const De=_e.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=De}})}formatCells(me){this.editor.update(()=>{const _e=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(_e))throw Error("Expected grid selection");const De=e.$createRangeSelection(),Fe=De.anchor,ke=De.focus;_e.getNodes().forEach(ze=>{l(ze)&&ze.getTextContentSize()!==0&&(Fe.set(ze.getKey(),0,"element"),ke.set(ze.getKey(),ze.getChildrenSize(),"element"),De.formatText(me))}),e.$setSelection(_e),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const me=this.editor;me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(De))throw Error("Expected grid selection");const Fe=De.getNodes().filter(l);if(Fe.length===this.grid.columns*this.grid.rows){_e.selectPrevious(),_e.remove(),e.$getRoot().selectStart();return}Fe.forEach(ke=>{if(e.$isElementNode(ke)){const ze=e.$createParagraphNode(),tt=e.$createTextNode();ze.append(tt),ke.append(ze),ke.getChildren().forEach(ut=>{ut!==ze&&ut.remove()})}}),M(me,this.grid,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}}const v="__lexicalTableSelection";function T(Se,me,_e,De){const Fe=_e.getRootElement();if(Fe===null)throw new Error("No root element.");const ke=new y(_e,Se.getKey()),ze=_e._window||window;O(me,ke),me.addEventListener("mousedown",Qe=>{setTimeout(()=>{if(Qe.button!==0||!ze)return;const et=k(Qe.target);et!==null&&(re(Qe),ke.setAnchorCellForSelection(et));const lt=()=>{ze.removeEventListener("mouseup",lt),ze.removeEventListener("mousemove",wt)},wt=_t=>{const Rt=k(_t.target);Rt!==null&&(ke.anchorX!==Rt.x||ke.anchorY!==Rt.y)&&(_t.preventDefault(),ke.setFocusCellForSelection(Rt))};ze.addEventListener("mouseup",lt),ze.addEventListener("mousemove",wt)},0)});const tt=Qe=>{Qe.button===0&&_e.update(()=>{const et=e.$getSelection(),lt=Qe.target;e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&Fe.contains(lt)&&ke.clearHighlight()})};ze.addEventListener("mousedown",tt),ke.listenersToRemove.add(()=>ze.removeEventListener("mousedown",tt)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_DOWN_COMMAND,Qe=>ee(_e,Qe,"down",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_UP_COMMAND,Qe=>ee(_e,Qe,"up",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_LEFT_COMMAND,Qe=>ee(_e,Qe,"backward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,Qe=>ee(_e,Qe,"forward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ESCAPE_COMMAND,Qe=>{const et=e.$getSelection();if(e.DEPRECATED_$isGridSelection(et)){const lt=t.$findMatchingParent(et.focus.getNode(),l);if(l(lt))return re(Qe),lt.selectEnd(),!0}return!1},e.COMMAND_PRIORITY_HIGH));const ut=Qe=>()=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),kt=>l(kt));if(!l(lt))return!1;const wt=et.anchor.getNode(),_t=et.focus.getNode(),Rt=Se.isParentOf(wt),qe=Se.isParentOf(_t);if(Rt&&!qe||qe&&!Rt)return ke.clearText(),!0;const ot=t.$findMatchingParent(et.anchor.getNode(),kt=>e.$isElementNode(kt)),yt=ot&&t.$findMatchingParent(ot,kt=>e.$isElementNode(kt)&&l(kt.getParent()));if(!e.$isElementNode(yt)||!e.$isElementNode(ot))return!1;if(Qe===e.DELETE_LINE_COMMAND&&yt.getPreviousSibling()===null)return!0;if((Qe===e.DELETE_CHARACTER_COMMAND||Qe===e.DELETE_WORD_COMMAND)&&et.isCollapsed()&&et.anchor.offset===0&&ot!==yt){const kt=ot.getChildren(),Dt=e.$createParagraphNode();return kt.forEach(Vt=>Dt.append(Vt)),ot.replace(Dt),ot.getWritable().__parent=lt.getKey(),!0}}return!1};[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(Qe=>{ke.listenersToRemove.add(_e.registerCommand(Qe,ut(Qe),e.COMMAND_PRIORITY_CRITICAL))});const Et=Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return Qe.preventDefault(),Qe.stopPropagation(),ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1};ke.listenersToRemove.add(_e.registerCommand(e.KEY_BACKSPACE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_DELETE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FORMAT_TEXT_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.formatCells(Qe),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearHighlight(),!1;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),De&&ke.listenersToRemove.add(_e.registerCommand(e.KEY_TAB_COMMAND,Qe=>{const et=e.$getSelection();if(!e.$isRangeSelection(et)||!et.isCollapsed()||!Q(et,Se))return!1;const lt=U(et.anchor.getNode());if(lt===null)return!1;re(Qe);const wt=Se.getCordsFromCellNode(lt,ke.grid);return Z(ke,Se,wt.x,wt.y,Qe.shiftKey?"backward":"forward"),!0},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FOCUS_COMMAND,Qe=>Se.isSelected(),e.COMMAND_PRIORITY_HIGH));function Bt(Qe){const et=Se.getCordsFromCellNode(Qe,ke.grid);return Se.getCellFromCordsOrThrow(et.x,et.y,ke.grid)}return ke.listenersToRemove.add(_e.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{const Qe=e.$getSelection(),et=e.$getPreviousSelection();if(e.$isRangeSelection(Qe)){const{anchor:lt,focus:wt}=Qe,_t=lt.getNode(),Rt=wt.getNode(),qe=U(_t),ot=U(Rt),yt=qe&&Se.is(j(qe)),kt=ot&&Se.is(j(ot)),Dt=yt!==kt,Vt=yt&&kt,sn=Qe.isBackward();if(Dt){const fr=Qe.clone();fr.focus.set(Se.getKey(),sn?0:Se.getChildrenSize(),"element"),e.$setSelection(fr),X(_e,ke)}else Vt&&(qe.is(ot)||(ke.setAnchorCellForSelection(Bt(qe)),ke.setFocusCellForSelection(Bt(ot),!0)))}return Qe&&!Qe.is(et)&&(e.DEPRECATED_$isGridSelection(Qe)||e.DEPRECATED_$isGridSelection(et))&&ke.gridSelection&&!ke.gridSelection.is(et)?(e.DEPRECATED_$isGridSelection(Qe)&&Qe.gridKey===ke.tableNodeKey?ke.updateTableGridSelection(Qe):!e.DEPRECATED_$isGridSelection(Qe)&&e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&ke.updateTableGridSelection(null),!1):(ke.hasHijackedSelectionStyles&&!Se.isSelected()?oe(_e,ke):!ke.hasHijackedSelectionStyles&&Se.isSelected()&&X(_e,ke),!1)},e.COMMAND_PRIORITY_CRITICAL)),ke}function O(Se,me){Se[v]=me}function R(Se){return Se[v]}function k(Se){let me=Se;for(;me!=null;){const _e=me.nodeName;if(_e==="TD"||_e==="TH"){const De=me._cell;return De===void 0?null:De}me=me.parentNode}return null}function P(Se){const me=[],_e={cells:me,columns:0,rows:0};let De=Se.firstChild,Fe=0,ke=0;for(me.length=0;De!=null;){const ze=De.nodeName;if(ze==="TD"||ze==="TH"){const Et=De,Bt={elem:Et,hasBackgroundColor:Et.style.backgroundColor!=="",highlighted:!1,x:Fe,y:ke};De._cell=Bt;let Qe=me[ke];Qe===void 0&&(Qe=me[ke]=[]),Qe[Fe]=Bt}else{const Et=De.firstChild;if(Et!=null){De=Et;continue}}const tt=De.nextSibling;if(tt!=null){Fe++,De=tt;continue}const ut=De.parentNode;if(ut!=null){const Et=ut.nextSibling;if(Et==null)break;ke++,Fe=0,De=Et}}return _e.columns=Fe+1,_e.rows=ke+1,_e}function M(Se,me,_e){const De=new Set(_e?_e.getNodes():[]);Y(me,(Fe,ke)=>{const ze=Fe.elem;De.has(ke)?(Fe.highlighted=!0,ne(Se,Fe)):(Fe.highlighted=!1,fe(Se,Fe),ze.getAttribute("style")||ze.removeAttribute("style"))})}function Y(Se,me){const{cells:_e}=Se;for(let De=0;De<_e.length;De++){const Fe=_e[De];if(Fe)for(let ke=0;ke<Fe.length;ke++){const ze=Fe[ke];if(!ze)continue;const tt=e.$getNearestNodeFromDOMNode(ze.elem);tt!==null&&me(ze,tt,{x:ke,y:De})}}}function X(Se,me){me.disableHighlightStyle(),Y(me.grid,_e=>{_e.highlighted=!0,ne(Se,_e)})}function oe(Se,me){me.enableHighlightStyle(),Y(me.grid,_e=>{const De=_e.elem;_e.highlighted=!1,fe(Se,_e),De.getAttribute("style")||De.removeAttribute("style")})}const Z=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)?de(me.getCellNodeFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid),ke):De!==(ke?Se.grid.rows-1:0)?de(me.getCellNodeFromCordsOrThrow(ke?0:Se.grid.columns-1,De+(ke?1:-1),Se.grid),ke):ke?me.selectNext():me.selectPrevious(),!0;case"up":return De!==0?de(me.getCellNodeFromCordsOrThrow(_e,De-1,Se.grid),!1):me.selectPrevious(),!0;case"down":return De!==Se.grid.rows-1?de(me.getCellNodeFromCordsOrThrow(_e,De+1,Se.grid),!0):me.selectNext(),!0;default:return!1}},K=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)&&Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid)),!0;case"up":return De!==0?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De-1,Se.grid)),!0):!1;case"down":return De!==Se.grid.rows-1?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De+1,Se.grid)),!0):!1;default:return!1}};function Q(Se,me){if(e.$isRangeSelection(Se)||e.DEPRECATED_$isGridSelection(Se)){const _e=me.isParentOf(Se.anchor.getNode()),De=me.isParentOf(Se.focus.getNode());return _e&&De}return!1}function de(Se,me){me?Se.selectStart():Se.selectEnd()}const pe="172,206,247";function ne(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null?_e.style.setProperty("background-color",`rgb(${pe})`):_e.style.setProperty("background-image",`linear-gradient(to right, rgba(${pe},0.85), rgba(${pe},0.85))`),_e.style.setProperty("caret-color","transparent")}function fe(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null&&_e.style.removeProperty("background-color"),_e.style.removeProperty("background-image"),_e.style.removeProperty("caret-color")}function U(Se){const me=t.$findMatchingParent(Se,l);return l(me)?me:null}function j(Se){const me=t.$findMatchingParent(Se,w);return w(me)?me:null}function ee(Se,me,_e,De,Fe){const ke=e.$getSelection();if(!Q(ke,De))return!1;if(e.$isRangeSelection(ke)&&ke.isCollapsed()){if(_e==="backward"||_e==="forward")return!1;const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l);if(!l(ut)||!ut.is(Et))return!1;const Bt=j(ut);if(Bt!==De&&Bt!=null){const qe=Se.getElementByKey(Bt.getKey());if(qe!=null)return Fe.grid=P(qe),ee(Se,me,_e,Bt,Fe)}const Qe=Se.getElementByKey(ut.__key),et=Se.getElementByKey(ze.key);if(et==null||Qe==null)return!1;let lt;if(ze.type==="element")lt=et.getBoundingClientRect();else{const qe=window.getSelection();if(qe===null||qe.rangeCount===0)return!1;lt=qe.getRangeAt(0).getBoundingClientRect()}const wt=_e==="up"?ut.getFirstChild():ut.getLastChild();if(wt==null)return!1;const _t=Se.getElementByKey(wt.__key);if(_t==null)return!1;const Rt=_t.getBoundingClientRect();if(_e==="up"?Rt.top>lt.top-lt.height:lt.bottom+lt.height>Rt.bottom){re(me);const qe=De.getCordsFromCellNode(ut,Fe.grid);if(me.shiftKey){const ot=De.getCellFromCordsOrThrow(qe.x,qe.y,Fe.grid);Fe.setAnchorCellForSelection(ot),Fe.setFocusCellForSelection(ot,!0)}else return Z(Fe,De,qe.x,qe.y,_e);return!0}}else if(e.DEPRECATED_$isGridSelection(ke)){const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l),[Bt]=ke.getNodes(),Qe=Se.getElementByKey(Bt.getKey());if(!l(ut)||!l(Et)||!w(Bt)||Qe==null)return!1;Fe.updateTableGridSelection(ke);const et=P(Qe),lt=De.getCordsFromCellNode(ut,et),wt=De.getCellFromCordsOrThrow(lt.x,lt.y,et);if(Fe.setAnchorCellForSelection(wt),re(me),me.shiftKey){const _t=De.getCordsFromCellNode(Et,et);return K(Fe,Bt,_t.x,_t.y,_e)}else Et.selectEnd();return!0}return!1}function re(Se){Se.preventDefault(),Se.stopImmediatePropagation(),Se.stopPropagation()}class B extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(me){return new B(me.__key)}static importDOM(){return{table:me=>({conversion:J,priority:1})}}static importJSON(me){return F()}constructor(me){super(me)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(me,_e){const De=document.createElement("table");return t.addClassNamesToElement(De,me.theme.table),De}updateDOM(){return!1}exportDOM(me){return{...super.exportDOM(me),after:_e=>{if(_e){const De=_e.cloneNode(),Fe=document.createElement("colgroup"),ke=document.createElement("tbody");t.isHTMLElement(_e)&&ke.append(..._e.children);const ze=this.getFirstChildOrThrow();if(!b(ze))throw new Error("Expected to find row node.");const tt=ze.getChildrenSize();for(let ut=0;ut<tt;ut++){const Et=document.createElement("col");Fe.append(Et)}return De.replaceChildren(Fe,ke),De}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(me,_e){const{rows:De,cells:Fe}=_e;for(let ke=0;ke<De;ke++){const ze=Fe[ke];if(ze==null)continue;const tt=ze.findIndex(ut=>{if(!ut)return;const{elem:Et}=ut;return e.$getNearestNodeFromDOMNode(Et)===me});if(tt!==-1)return{x:tt,y:ke}}throw new Error("Cell not found in table.")}getCellFromCords(me,_e,De){const{cells:Fe}=De,ke=Fe[_e];return ke==null?null:ke[me]??null}getCellFromCordsOrThrow(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(!Fe)throw new Error("Cell not found at cords.");return Fe}getCellNodeFromCords(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(Fe==null)return null;const ke=e.$getNearestNodeFromDOMNode(Fe.elem);return l(ke)?ke:null}getCellNodeFromCordsOrThrow(me,_e,De){const Fe=this.getCellNodeFromCords(me,_e,De);if(!Fe)throw new Error("Node at cords not TableCellNode.");return Fe}canSelectBefore(){return!0}canIndent(){return!1}}function W(Se,me){const _e=Se.getElementByKey(me.getKey());if(_e==null)throw new Error("Table Element Not Found");return P(_e)}function J(Se){return{node:F()}}function F(){return e.$applyNodeReplacement(new B)}function w(Se){return Se instanceof B}function N(Se,me,_e=!0){const De=F();for(let Fe=0;Fe<Se;Fe++){const ke=m();for(let ze=0;ze<me;ze++){let tt=r.NO_STATUS;typeof _e=="object"?(Fe===0&&_e.rows&&(tt|=r.ROW),ze===0&&_e.columns&&(tt|=r.COLUMN)):_e&&(Fe===0&&(tt|=r.ROW),ze===0&&(tt|=r.COLUMN));const ut=a(tt),Et=e.$createParagraphNode();Et.append(e.$createTextNode()),ut.append(Et),ke.append(ut)}De.append(ke)}return De}function I(Se){const me=t.$findMatchingParent(Se,_e=>l(_e));return l(me)?me:null}function q(Se){const me=t.$findMatchingParent(Se,_e=>b(_e));if(b(me))return me;throw new Error("Expected table cell to be inside of table row.")}function ue(Se){const me=t.$findMatchingParent(Se,_e=>w(_e));if(w(me))return me;throw new Error("Expected table cell to be inside of table.")}function he(Se){const me=q(Se);return ue(me).getChildren().findIndex(_e=>_e.is(me))}function se(Se){return q(Se).getChildren().findIndex(me=>me.is(Se))}function Ce(Se,me){const _e=ue(Se),{x:De,y:Fe}=_e.getCordsFromCellNode(Se,me);return{above:_e.getCellNodeFromCords(De,Fe-1,me),below:_e.getCellNodeFromCords(De,Fe+1,me),left:_e.getCellNodeFromCords(De-1,Fe,me),right:_e.getCellNodeFromCords(De+1,Fe,me)}}function Oe(Se,me){const _e=Se.getChildren();if(me>=_e.length||me<0)throw new Error("Expected table cell to be inside of table row.");return _e[me].remove(),Se}function Be(Se,me,_e=!0,De,Fe){const ke=Se.getChildren();if(me>=ke.length||me<0)throw new Error("Table row target index out of range");const ze=ke[me];if(b(ze))for(let tt=0;tt<De;tt++){const ut=ze.getChildren(),Et=ut.length,Bt=m();for(let Qe=0;Qe<Et;Qe++){const et=ut[Qe];if(!l(et))throw Error("Expected table cell");const{above:lt,below:wt}=Ce(et,Fe);let _t=r.NO_STATUS;const Rt=lt&&lt.getWidth()||wt&&wt.getWidth()||void 0;(lt&&lt.hasHeaderState(r.COLUMN)||wt&&wt.hasHeaderState(r.COLUMN))&&(_t|=r.COLUMN);const qe=a(_t,1,Rt);qe.append(e.$createParagraphNode()),Bt.append(qe)}_e?ze.insertAfter(Bt):ze.insertBefore(Bt)}else throw new Error("Row before insertion index does not exist.");return Se}function ce(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a INTERNAL_PointSelection");const _e=me.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,ze]=e.DEPRECATED_$computeGridMap(Fe,De,De),tt=ke[0].length,{startRow:ut}=ze;if(Se){const Et=ut+De.__rowSpan-1,Bt=ke[Et],Qe=m();for(let lt=0;lt<tt;lt++){const{cell:wt,startRow:_t}=Bt[lt];_t+wt.__rowSpan-1<=Et?Qe.append(a(r.NO_STATUS)):wt.setRowSpan(wt.__rowSpan+1)}const et=Fe.getChildAtIndex(Et);if(!e.DEPRECATED_$isGridRowNode(et))throw Error("focusEndRow is not a GridRowNode");et.insertAfter(Qe)}else{const Et=ke[ut],Bt=m();for(let et=0;et<tt;et++){const{cell:lt,startRow:wt}=Et[et];wt===ut?Bt.append(a(r.NO_STATUS)):lt.setRowSpan(lt.__rowSpan+1)}const Qe=Fe.getChildAtIndex(ut);if(!e.DEPRECATED_$isGridRowNode(Qe))throw Error("focusEndRow is not a GridRowNode");Qe.insertBefore(Bt)}}function le(Se,me,_e=!0,De,Fe){const ke=Se.getChildren(),ze=[];for(let tt=0;tt<ke.length;tt++){const ut=ke[tt];if(b(ut))for(let Et=0;Et<De;Et++){const Bt=ut.getChildren();if(me>=Bt.length||me<0)throw new Error("Table column target index out of range");const Qe=Bt[me];if(!l(Qe))throw Error("Expected table cell");const{left:et,right:lt}=Ce(Qe,Fe);let wt=r.NO_STATUS;(et&&et.hasHeaderState(r.ROW)||lt&&lt.hasHeaderState(r.ROW))&&(wt|=r.ROW);const _t=a(wt);_t.append(e.$createParagraphNode()),ze.push({newTableCell:_t,targetCell:Qe})}}return ze.forEach(({newTableCell:tt,targetCell:ut})=>{_e?ut.insertAfter(tt):ut.insertBefore(tt)}),Se}function ve(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a PointSeleciton");const _e=me.anchor.getNode(),De=me.focus.getNode(),[Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,,ze]=e.DEPRECATED_$getNodeTriplet(De),[tt,ut,Et]=e.DEPRECATED_$computeGridMap(ze,ke,Fe),Bt=tt.length,Qe=Se?Math.max(ut.startColumn,Et.startColumn):Math.min(ut.startColumn,Et.startColumn),et=Se?Qe+ke.__colSpan-1:Qe-1,lt=ze.getFirstChild();if(!e.DEPRECATED_$isGridRowNode(lt))throw Error("Expected firstTable child to be a row");let wt=null;function _t(){const qe=a(r.NO_STATUS).append(e.$createParagraphNode());return wt===null&&(wt=qe),qe}let Rt=lt;e:for(let qe=0;qe<Bt;qe++){if(qe!==0){const Vt=Rt.getNextSibling();if(!e.DEPRECATED_$isGridRowNode(Vt))throw Error("Expected row nextSibling to be a row");Rt=Vt}const ot=tt[qe];if(et<0){st(Rt,_t());continue}const{cell:yt,startColumn:kt,startRow:Dt}=ot[et];if(kt+yt.__colSpan-1<=et){let Vt=yt,sn=Dt,fr=et;for(;sn!==qe&&Vt.__rowSpan>1;)if(fr-=yt.__colSpan,fr>=0){const{cell:Nr,startRow:Qo}=ot[fr];Vt=Nr,sn=Qo}else{Rt.append(_t());continue e}Vt.insertAfter(_t())}else yt.setColSpan(yt.__colSpan+1)}wt!==null&&Xe(wt)}function Me(Se,me){const _e=Se.getChildren();for(let De=0;De<_e.length;De++){const Fe=_e[De];if(b(Fe)){const ke=Fe.getChildren();if(me>=ke.length||me<0)throw new Error("Table column target index out of range");ke[me].remove()}}return Se}function Pe(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startRow:Et}=tt,{startRow:Bt}=ut,Qe=Bt+ke.__rowSpan-1;if(ze.length===Qe-Et+1){Fe.remove();return}const et=ze[0].length,lt=ze[Qe+1],wt=Fe.getChildAtIndex(Qe+1);for(let _t=Qe;_t>=Et;_t--){for(let qe=et-1;qe>=0;qe--){const{cell:ot,startRow:yt,startColumn:kt}=ze[_t][qe];if(kt===qe&&(_t===Et&&yt<Et&&ot.setRowSpan(ot.__rowSpan-(yt-Et)),yt>=Et&&yt+ot.__rowSpan-1>Qe)){if(ot.setRowSpan(ot.__rowSpan-(Qe-yt+1)),wt===null)throw Error("Expected nextRowNode not to be null");if(qe===0)st(wt,ot);else{const{cell:Dt}=lt[qe-1];Dt.insertAfter(ot)}}}const Rt=Fe.getChildAtIndex(_t);if(!e.DEPRECATED_$isGridRowNode(Rt))throw Error(`Expected GridNode childAtIndex(${String(_t)}) to be RowNode`);Rt.remove()}if(lt!==void 0){const{cell:_t}=lt[0];Xe(_t)}else{const _t=ze[Et-1],{cell:Rt}=_t[0];Xe(Rt)}}function We(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startColumn:Et}=tt,{startRow:Bt,startColumn:Qe}=ut,et=Math.min(Et,Qe),lt=Math.max(Et+De.__colSpan-1,Qe+ke.__colSpan-1),wt=lt-et+1;if(ze[0].length===lt-et+1){Fe.selectPrevious(),Fe.remove();return}const _t=ze.length;for(let ot=0;ot<_t;ot++)for(let yt=et;yt<=lt;yt++){const{cell:kt,startColumn:Dt}=ze[ot][yt];if(Dt<et){if(yt===et){const Vt=et-Dt;kt.setColSpan(kt.__colSpan-Math.min(wt,kt.__colSpan-Vt))}}else if(Dt+kt.__colSpan-1>lt){if(yt===lt){const Vt=lt-Dt+1;kt.setColSpan(kt.__colSpan-Vt)}}else kt.remove()}const Rt=ze[Bt],qe=Rt[Qe+ke.__colSpan];if(qe!==void 0){const{cell:ot}=qe;Xe(ot)}else{const ot=Rt[Qe-1],{cell:yt}=ot;Xe(yt)}}function Xe(Se){const me=Se.getFirstDescendant();me==null?Se.selectStart():me.getParentOrThrow().selectStart()}function st(Se,me){const _e=Se.getFirstChild();_e!==null?_e.insertBefore(me):Se.append(me)}function dt(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),[_e,De,Fe]=e.DEPRECATED_$getNodeTriplet(me),ke=_e.__colSpan,ze=_e.__rowSpan;if(ke>1){for(let tt=1;tt<ke;tt++)_e.insertAfter(a(r.NO_STATUS));_e.setColSpan(1)}if(ze>1){const[tt,ut]=e.DEPRECATED_$computeGridMap(Fe,_e,_e),{startColumn:Et,startRow:Bt}=ut;let Qe;for(let et=1;et<ze;et++){const lt=Bt+et,wt=tt[lt];if(Qe=(Qe||De).getNextSibling(),!e.DEPRECATED_$isGridRowNode(Qe))throw Error("Expected row next sibling to be a row");let _t=null;for(let Rt=0;Rt<Et;Rt++){const qe=wt[Rt],ot=qe.cell;qe.startRow===lt&&(_t=ot),ot.__colSpan>1&&(Rt+=ot.__colSpan-1)}if(_t===null)for(let Rt=0;Rt<ke;Rt++)st(Qe,a(r.NO_STATUS));else for(let Rt=0;Rt<ke;Rt++)_t.insertAfter(a(r.NO_STATUS))}_e.setRowSpan(1)}}const Ct=e.createCommand("INSERT_TABLE_COMMAND");return tn.$createTableCellNode=a,tn.$createTableNode=F,tn.$createTableNodeWithDimensions=N,tn.$createTableRowNode=m,tn.$deleteTableColumn=Me,tn.$deleteTableColumn__EXPERIMENTAL=We,tn.$deleteTableRow__EXPERIMENTAL=Pe,tn.$getElementGridForTableNode=W,tn.$getTableCellNodeFromLexicalNode=I,tn.$getTableColumnIndexFromTableCellNode=se,tn.$getTableNodeFromLexicalNodeOrThrow=ue,tn.$getTableRowIndexFromTableCellNode=he,tn.$getTableRowNodeFromTableCellNodeOrThrow=q,tn.$insertTableColumn=le,tn.$insertTableColumn__EXPERIMENTAL=ve,tn.$insertTableRow=Be,tn.$insertTableRow__EXPERIMENTAL=ce,tn.$isTableCellNode=l,tn.$isTableNode=w,tn.$isTableRowNode=b,tn.$removeTableRowAtIndex=Oe,tn.$unmergeCell=dt,tn.INSERT_TABLE_COMMAND=Ct,tn.TableCellHeaderStates=r,tn.TableCellNode=o,tn.TableNode=B,tn.TableRowNode=u,tn.TableSelection=y,tn.applyTableHandlers=T,tn.getCellFromTarget=k,tn.getTableSelectionFromTableElement=R,tn}var nn={},j_;function D7(){if(j_)return nn;j_=1;var e=Xt(),t=yn();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(N){let I=new o(N.__headerState,N.__colSpan,N.__width,N.__key);return I.__rowSpan=N.__rowSpan,I.__backgroundColor=N.__backgroundColor,I}static importDOM(){return{td:()=>({conversion:i,priority:0}),th:()=>({conversion:i,priority:0})}}static importJSON(N){let I=N.rowSpan||1,q=a(N.headerState,N.colSpan||1,N.width||void 0);return q.__rowSpan=I,q.__backgroundColor=N.backgroundColor||null,q}constructor(N=r.NO_STATUS,I=1,q,ue){super(I,ue),this.__headerState=N,this.__width=q,this.__backgroundColor=null}createDOM(N){let I=document.createElement(this.getTag());return this.__width&&(I.style.width=`${this.__width}px`),1<this.__colSpan&&(I.colSpan=this.__colSpan),1<this.__rowSpan&&(I.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(I.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(I,N.theme.tableCell,this.hasHeader()&&N.theme.tableCellHeader),I}exportDOM(N){if({element:N}=super.exportDOM(N),N){var I=this.getParentOrThrow().getChildrenSize();N.style.border="1px solid black",1<this.__colSpan&&(N.colSpan=this.__colSpan),1<this.__rowSpan&&(N.rowSpan=this.__rowSpan),N.style.width=`${this.getWidth()||Math.max(90,700/I)}px`,N.style.verticalAlign="top",N.style.textAlign="start",I=this.getBackgroundColor(),I!==null?N.style.backgroundColor=I:this.hasHeader()&&(N.style.backgroundColor="#f2f3f5")}return{element:N}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(N){return this.getWritable().__headerState=N,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(N){return this.getWritable().__width=N,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(N){this.getWritable().__backgroundColor=N}toggleHeaderStyle(N){let I=this.getWritable();return I.__headerState=(I.__headerState&N)===N?I.__headerState-N:I.__headerState+N,I}hasHeaderState(N){return(this.getHeaderStyles()&N)===N}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(N){return N.__headerState!==this.__headerState||N.__width!==this.__width||N.__colSpan!==this.__colSpan||N.__rowSpan!==this.__rowSpan||N.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(w){var N=w.nodeName.toLowerCase();let I;return n.test(w.style.width)&&(I=parseFloat(w.style.width)),N=a(N==="th"?r.ROW:r.NO_STATUS,w.colSpan,I),N.__rowSpan=w.rowSpan,w=w.style.backgroundColor,w!==""&&(N.__backgroundColor=w),{forChild:(q,ue)=>l(ue)&&!e.$isElementNode(q)?(ue=e.$createParagraphNode(),e.$isLineBreakNode(q)&&q.getTextContent()===`
275
- `?null:(ue.append(q),ue)):q,node:N}}function a(w,N=1,I){return e.$applyNodeReplacement(new o(w,N,I))}function l(w){return w instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(N){return new u(N.__height,N.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(N){return m(N.height)}constructor(N,I){super(I),this.__height=N}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(N){let I=document.createElement("tr");return this.__height&&(I.style.height=`${this.__height}px`),t.addClassNamesToElement(I,N.theme.tableRow),I}isShadowRoot(){return!0}setHeight(N){return this.getWritable().__height=N,this.__height}getHeight(){return this.getLatest().__height}updateDOM(N){return N.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(w){let N;return n.test(w.style.height)&&(N=parseFloat(w.style.height)),{node:m(N)}}function m(w){return e.$applyNodeReplacement(new u(w))}function b(w){return w instanceof u}function C(w){let N=new URLSearchParams;N.append("code",w);for(let I=1;I<arguments.length;I++)N.append("v",arguments[I]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${N} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let _=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class y{constructor(N,I){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=I,this.editor=N,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(N=>N())}trackTableGrid(){let N=new MutationObserver(I=>{this.editor.update(()=>{var q=!1;for(let ue=0;ue<I.length;ue++){const he=I[ue].target.nodeName;if(he==="TABLE"||he==="TR"){q=!0;break}}if(q){if(q=this.editor.getElementByKey(this.tableNodeKey),!q)throw Error("Expected to find TableElement in DOM");this.grid=T(q)}})});this.editor.update(()=>{let I=this.editor.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");this.grid=T(I),N.observe(I,{childList:!0,subtree:!0})})}clearHighlight(){let N=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),N.update(()=>{var I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");if(I=N.getElementByKey(this.tableNodeKey),!I)throw Error("Expected to find TableElement in DOM");I=T(I),O(N,I,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(I,N._config.theme.tableSelection),I.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(I,N._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(N){if(N!=null&&N.gridKey===this.tableNodeKey){let I=this.editor;this.gridSelection=N,this.isHighlightingCells=!0,this.disableHighlightStyle(),O(I,this.grid,this.gridSelection)}else N==null?this.clearHighlight():(this.tableNodeKey=N.gridKey,this.updateTableGridSelection(N))}setFocusCellForSelection(N,I=!1){let q=this.editor;q.update(()=>{var ue=e.$getNodeByKey(this.tableNodeKey);if(!j(ue))throw Error("Expected TableNode.");if(!q.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=N.x;let he=N.y;if(this.focusCell=N,this.anchorCell!==null){let se=_?(q._window||window).getSelection():null;se&&se.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==he||I))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&he===this.focusY)return;this.focusX=ue,this.focusY=he,this.isHighlightingCells&&(ue=e.$getNearestNodeFromDOMNode(N.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),q.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),O(q,this.grid,this.gridSelection)))})}setAnchorCellForSelection(N){this.isHighlightingCells=!1,this.anchorCell=N,this.anchorX=N.x,this.anchorY=N.y,this.editor.update(()=>{var I=e.$getNearestNodeFromDOMNode(N.elem);l(I)&&(I=I.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=I)})}formatCells(N){this.editor.update(()=>{let I=e.$getSelection();e.DEPRECATED_$isGridSelection(I)||C(11);let q=e.$createRangeSelection(),ue=q.anchor,he=q.focus;I.getNodes().forEach(se=>{l(se)&&se.getTextContentSize()!==0&&(ue.set(se.getKey(),0,"element"),he.set(se.getKey(),se.getChildrenSize(),"element"),q.formatText(N))}),e.$setSelection(I),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let N=this.editor;N.update(()=>{let I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");var q=e.$getSelection();e.DEPRECATED_$isGridSelection(q)||C(11),q=q.getNodes().filter(l),q.length===this.grid.columns*this.grid.rows?(I.selectPrevious(),I.remove(),e.$getRoot().selectStart()):(q.forEach(ue=>{if(e.$isElementNode(ue)){let he=e.$createParagraphNode(),se=e.$createTextNode();he.append(se),ue.append(he),ue.getChildren().forEach(Ce=>{Ce!==he&&Ce.remove()})}}),O(N,this.grid,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function v(w){for(;w!=null;){let N=w.nodeName;if(N==="TD"||N==="TH"){if(w=w._cell,w===void 0)break;return w}w=w.parentNode}return null}function T(w){let N=[],I={cells:N,columns:0,rows:0};var q=w.firstChild;let ue=w=0;for(N.length=0;q!=null;){var he=q.nodeName;if(he==="TD"||he==="TH"){he=q,he={elem:he,hasBackgroundColor:he.style.backgroundColor!=="",highlighted:!1,x:w,y:ue},q._cell=he;let se=N[ue];se===void 0&&(se=N[ue]=[]),se[w]=he}else if(he=q.firstChild,he!=null){q=he;continue}if(he=q.nextSibling,he!=null)w++,q=he;else if(he=q.parentNode,he!=null){if(q=he.nextSibling,q==null)break;ue++,w=0}}return I.columns=w+1,I.rows=ue+1,I}function O(w,N,I){let q=new Set(I?I.getNodes():[]);R(N,(ue,he)=>{let se=ue.elem;q.has(he)?(ue.highlighted=!0,oe(w,ue)):(ue.highlighted=!1,Z(w,ue),se.getAttribute("style")||se.removeAttribute("style"))})}function R(w,N){({cells:w}=w);for(let I=0;I<w.length;I++){let q=w[I];if(q)for(let ue=0;ue<q.length;ue++){let he=q[ue];if(!he)continue;let se=e.$getNearestNodeFromDOMNode(he.elem);se!==null&&N(he,se,{x:ue,y:I})}}}function k(w,N){N.disableHighlightStyle(),R(N.grid,I=>{I.highlighted=!0,oe(w,I)})}function P(w,N){N.enableHighlightStyle(),R(N.grid,I=>{let q=I.elem;I.highlighted=!1,Z(w,I),q.getAttribute("style")||q.removeAttribute("style")})}let M=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)?(w=N.getCellNodeFromCordsOrThrow(I+(he?1:-1),q,w.grid),he?w.selectStart():w.selectEnd()):q!==(he?w.grid.rows-1:0)?(w=N.getCellNodeFromCordsOrThrow(he?0:w.grid.columns-1,q+(he?1:-1),w.grid),he?w.selectStart():w.selectEnd()):he?N.selectNext():N.selectPrevious(),!0;case"up":return q!==0?N.getCellNodeFromCordsOrThrow(I,q-1,w.grid).selectEnd():N.selectPrevious(),!0;case"down":return q!==w.grid.rows-1?N.getCellNodeFromCordsOrThrow(I,q+1,w.grid).selectStart():N.selectNext(),!0;default:return!1}},Y=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)&&w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I+(he?1:-1),q,w.grid)),!0;case"up":return q!==0?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q-1,w.grid)),!0):!1;case"down":return q!==w.grid.rows-1?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q+1,w.grid)),!0):!1;default:return!1}};function X(w,N){if(e.$isRangeSelection(w)||e.DEPRECATED_$isGridSelection(w)){let I=N.isParentOf(w.anchor.getNode());return w=N.isParentOf(w.focus.getNode()),I&&w}return!1}function oe(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null?w.style.setProperty("background-color","rgb(172,206,247)"):w.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),w.style.setProperty("caret-color","transparent")}function Z(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null&&w.style.removeProperty("background-color"),w.style.removeProperty("background-image"),w.style.removeProperty("caret-color")}function K(w){return w=t.$findMatchingParent(w,l),l(w)?w:null}function Q(w){return w=t.$findMatchingParent(w,j),j(w)?w:null}function de(w,N,I,q,ue){let he=e.$getSelection();if(!X(he,q))return!1;if(e.$isRangeSelection(he)&&he.isCollapsed()){if(I==="backward"||I==="forward")return!1;let{anchor:Be,focus:ce}=he;var se=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l);if(!l(se)||!se.is(Ce))return!1;if(Ce=Q(se),Ce!==q&&Ce!=null){var Oe=w.getElementByKey(Ce.getKey());if(Oe!=null)return ue.grid=T(Oe),de(w,N,I,Ce,ue)}if(Ce=w.getElementByKey(se.__key),Oe=w.getElementByKey(Be.key),Oe==null||Ce==null)return!1;if(Be.type==="element")Ce=Oe.getBoundingClientRect();else{if(Ce=window.getSelection(),Ce===null||Ce.rangeCount===0)return!1;Ce=Ce.getRangeAt(0).getBoundingClientRect()}if(Oe=I==="up"?se.getFirstChild():se.getLastChild(),Oe==null||(w=w.getElementByKey(Oe.__key),w==null))return!1;if(w=w.getBoundingClientRect(),I==="up"?w.top>Ce.top-Ce.height:Ce.bottom+Ce.height>w.bottom){if(pe(N),w=q.getCordsFromCellNode(se,ue.grid),N.shiftKey)I=q.getCellFromCordsOrThrow(w.x,w.y,ue.grid),ue.setAnchorCellForSelection(I),ue.setFocusCellForSelection(I,!0);else return M(ue,q,w.x,w.y,I);return!0}}else if(e.DEPRECATED_$isGridSelection(he)){let{anchor:Be,focus:ce}=he;return Oe=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l),[se]=he.getNodes(),w=w.getElementByKey(se.getKey()),!l(Oe)||!l(Ce)||!j(se)||w==null?!1:(ue.updateTableGridSelection(he),w=T(w),Oe=q.getCordsFromCellNode(Oe,w),Oe=q.getCellFromCordsOrThrow(Oe.x,Oe.y,w),ue.setAnchorCellForSelection(Oe),pe(N),N.shiftKey?(N=q.getCordsFromCellNode(Ce,w),Y(ue,se,N.x,N.y,I)):(Ce.selectEnd(),!0))}return!1}function pe(w){w.preventDefault(),w.stopImmediatePropagation(),w.stopPropagation()}class ne extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(N){return new ne(N.__key)}static importDOM(){return{table:()=>({conversion:fe,priority:1})}}static importJSON(){return U()}constructor(N){super(N)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(N){let I=document.createElement("table");return t.addClassNamesToElement(I,N.theme.table),I}updateDOM(){return!1}exportDOM(N){return{...super.exportDOM(N),after:I=>{if(I){let q=I.cloneNode(),ue=document.createElement("colgroup"),he=document.createElement("tbody");if(t.isHTMLElement(I)&&he.append(...I.children),I=this.getFirstChildOrThrow(),!b(I))throw Error("Expected to find row node.");I=I.getChildrenSize();for(let se=0;se<I;se++){let Ce=document.createElement("col");ue.append(Ce)}return q.replaceChildren(ue,he),q}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(N,I){let{rows:q,cells:ue}=I;for(I=0;I<q;I++){var he=ue[I];if(he!=null&&(he=he.findIndex(se=>{if(se)return{elem:se}=se,e.$getNearestNodeFromDOMNode(se)===N}),he!==-1))return{x:he,y:I}}throw Error("Cell not found in table.")}getCellFromCords(N,I,q){return{cells:q}=q,I=q[I],I==null?null:(N=I[N],N??null)}getCellFromCordsOrThrow(N,I,q){if(N=this.getCellFromCords(N,I,q),!N)throw Error("Cell not found at cords.");return N}getCellNodeFromCords(N,I,q){return N=this.getCellFromCords(N,I,q),N==null?null:(N=e.$getNearestNodeFromDOMNode(N.elem),l(N)?N:null)}getCellNodeFromCordsOrThrow(N,I,q){if(N=this.getCellNodeFromCords(N,I,q),!N)throw Error("Node at cords not TableCellNode.");return N}canSelectBefore(){return!0}canIndent(){return!1}}function fe(){return{node:U()}}function U(){return e.$applyNodeReplacement(new ne)}function j(w){return w instanceof ne}function ee(w){if(w=t.$findMatchingParent(w,N=>b(N)),b(w))return w;throw Error("Expected table cell to be inside of table row.")}function re(w){if(w=t.$findMatchingParent(w,N=>j(N)),j(w))return w;throw Error("Expected table cell to be inside of table.")}function B(w,N){let I=re(w),{x:q,y:ue}=I.getCordsFromCellNode(w,N);return{above:I.getCellNodeFromCords(q,ue-1,N),below:I.getCellNodeFromCords(q,ue+1,N),left:I.getCellNodeFromCords(q-1,ue,N),right:I.getCellNodeFromCords(q+1,ue,N)}}function W(w){let N=w.getFirstDescendant();N==null?w.selectStart():N.getParentOrThrow().selectStart()}function J(w,N){let I=w.getFirstChild();I!==null?I.insertBefore(N):w.append(N)}let F=e.createCommand("INSERT_TABLE_COMMAND");return nn.$createTableCellNode=a,nn.$createTableNode=U,nn.$createTableNodeWithDimensions=function(w,N,I=!0){let q=U();for(let he=0;he<w;he++){let se=m();for(let Ce=0;Ce<N;Ce++){var ue=r.NO_STATUS;typeof I=="object"?(he===0&&I.rows&&(ue|=r.ROW),Ce===0&&I.columns&&(ue|=r.COLUMN)):I&&(he===0&&(ue|=r.ROW),Ce===0&&(ue|=r.COLUMN)),ue=a(ue);let Oe=e.$createParagraphNode();Oe.append(e.$createTextNode()),ue.append(Oe),se.append(ue)}q.append(se)}return q},nn.$createTableRowNode=m,nn.$deleteTableColumn=function(w,N){let I=w.getChildren();for(let ue=0;ue<I.length;ue++){var q=I[ue];if(b(q)){if(q=q.getChildren(),N>=q.length||0>N)throw Error("Table column target index out of range");q[N].remove()}}return w},nn.$deleteTableColumn__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[N]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,N);var{startColumn:Ce}=he;let{startRow:Oe,startColumn:Be}=se;w=Math.min(Ce,Be),Ce=Math.max(Ce+I.__colSpan-1,Be+N.__colSpan-1);let ce=Ce-w+1;if(ue[0].length===Ce-w+1)q.selectPrevious(),q.remove();else{var le=ue.length;for(let ve=0;ve<le;ve++)for(let Me=w;Me<=Ce;Me++){let{cell:Pe,startColumn:We}=ue[ve][Me];We<w?Me===w&&Pe.setColSpan(Pe.__colSpan-Math.min(ce,Pe.__colSpan-(w-We))):We+Pe.__colSpan-1>Ce?Me===Ce&&Pe.setColSpan(Pe.__colSpan-(Ce-We+1)):Pe.remove()}w=ue[Oe],N=w[Be+N.__colSpan],N!==void 0?({cell:N}=N,W(N)):({cell:N}=w[Be-1],W(N))}},nn.$deleteTableRow__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[w]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,w);({startRow:N}=he);var{startRow:Ce}=se;if(w=Ce+w.__rowSpan-1,ue.length===w-N+1)q.remove();else{Ce=ue[0].length;var Oe=ue[w+1],Be=q.getChildAtIndex(w+1);for(let le=w;le>=N;le--){for(var ce=Ce-1;0<=ce;ce--){let{cell:ve,startRow:Me,startColumn:Pe}=ue[le][ce];if(Pe===ce&&(le===N&&Me<N&&ve.setRowSpan(ve.__rowSpan-(Me-N)),Me>=N&&Me+ve.__rowSpan-1>w))if(ve.setRowSpan(ve.__rowSpan-(w-Me+1)),Be===null&&C(122),ce===0)J(Be,ve);else{let{cell:We}=Oe[ce-1];We.insertAfter(ve)}}ce=q.getChildAtIndex(le),e.DEPRECATED_$isGridRowNode(ce)||C(123,String(le)),ce.remove()}Oe!==void 0?({cell:N}=Oe[0],W(N)):({cell:N}=ue[N-1][0],W(N))}},nn.$getElementGridForTableNode=function(w,N){if(w=w.getElementByKey(N.getKey()),w==null)throw Error("Table Element Not Found");return T(w)},nn.$getTableCellNodeFromLexicalNode=function(w){return w=t.$findMatchingParent(w,N=>l(N)),l(w)?w:null},nn.$getTableColumnIndexFromTableCellNode=function(w){return ee(w).getChildren().findIndex(N=>N.is(w))},nn.$getTableNodeFromLexicalNodeOrThrow=re,nn.$getTableRowIndexFromTableCellNode=function(w){let N=ee(w);return re(N).getChildren().findIndex(I=>I.is(N))},nn.$getTableRowNodeFromTableCellNodeOrThrow=ee,nn.$insertTableColumn=function(w,N,I=!0,q,ue){let he=w.getChildren(),se=[];for(let Be=0;Be<he.length;Be++){let ce=he[Be];if(b(ce))for(let le=0;le<q;le++){var Ce=ce.getChildren();if(N>=Ce.length||0>N)throw Error("Table column target index out of range");Ce=Ce[N],l(Ce)||C(12);let{left:ve,right:Me}=B(Ce,ue);var Oe=r.NO_STATUS;(ve&&ve.hasHeaderState(r.ROW)||Me&&Me.hasHeaderState(r.ROW))&&(Oe|=r.ROW),Oe=a(Oe),Oe.append(e.$createParagraphNode()),se.push({newTableCell:Oe,targetCell:Ce})}}return se.forEach(({newTableCell:Be,targetCell:ce})=>{I?ce.insertAfter(Be):ce.insertBefore(Be)}),w},nn.$insertTableColumn__EXPERIMENTAL=function(w=!0){function N(){let le=a(r.NO_STATUS).append(e.$createParagraphNode());return Be===null&&(Be=le),le}var I=e.$getSelection();if(!e.$INTERNAL_isPointSelection(I))throw Error("Expected a PointSeleciton");var q=I.anchor.getNode();I=I.focus.getNode(),[q]=e.DEPRECATED_$getNodeTriplet(q);let[ue,,he]=e.DEPRECATED_$getNodeTriplet(I),[se,Ce,Oe]=e.DEPRECATED_$computeGridMap(he,ue,q);q=se.length,I=w?Math.max(Ce.startColumn,Oe.startColumn):Math.min(Ce.startColumn,Oe.startColumn),w=w?I+ue.__colSpan-1:I-1,I=he.getFirstChild(),e.DEPRECATED_$isGridRowNode(I)||C(120);let Be=null;var ce=I;e:for(I=0;I<q;I++){I!==0&&(ce=ce.getNextSibling(),e.DEPRECATED_$isGridRowNode(ce)||C(121));let le=se[I];if(0>w){J(ce,N());continue}let{cell:ve,startColumn:Me,startRow:Pe}=le[w];if(Me+ve.__colSpan-1<=w){let We=ve,Xe=Pe,st=w;for(;Xe!==I&&1<We.__rowSpan;)if(st-=ve.__colSpan,0<=st){let{cell:dt,startRow:Ct}=le[st];We=dt,Xe=Ct}else{ce.append(N());continue e}We.insertAfter(N())}else ve.setColSpan(ve.__colSpan+1)}Be!==null&&W(Be)},nn.$insertTableRow=function(w,N,I=!0,q,ue){var he=w.getChildren();if(N>=he.length||0>N)throw Error("Table row target index out of range");if(N=he[N],b(N))for(he=0;he<q;he++){let Ce=N.getChildren(),Oe=Ce.length,Be=m();for(let ce=0;ce<Oe;ce++){var se=Ce[ce];l(se)||C(12);let{above:le,below:ve}=B(se,ue);se=r.NO_STATUS;let Me=le&&le.getWidth()||ve&&ve.getWidth()||void 0;(le&&le.hasHeaderState(r.COLUMN)||ve&&ve.hasHeaderState(r.COLUMN))&&(se|=r.COLUMN),se=a(se,1,Me),se.append(e.$createParagraphNode()),Be.append(se)}I?N.insertAfter(Be):N.insertBefore(Be)}else throw Error("Row before insertion index does not exist.");return w},nn.$insertTableRow__EXPERIMENTAL=function(w=!0){var N=e.$getSelection();if(!e.$INTERNAL_isPointSelection(N))throw Error("Expected a INTERNAL_PointSelection");N=N.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N),[ue,he]=e.DEPRECATED_$computeGridMap(q,I,I);N=ue[0].length;var{startRow:se}=he;if(w){w=se+I.__rowSpan-1;var Ce=ue[w];se=m();for(var Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce+Be.__rowSpan-1<=w?se.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(w),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertAfter(se)}else{for(Ce=ue[se],w=m(),Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce===se?w.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(se),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertBefore(w)}},nn.$isTableCellNode=l,nn.$isTableNode=j,nn.$isTableRowNode=b,nn.$removeTableRowAtIndex=function(w,N){let I=w.getChildren();if(N>=I.length||0>N)throw Error("Expected table cell to be inside of table row.");return I[N].remove(),w},nn.$unmergeCell=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");w=w.anchor.getNode();let[N,I,q]=e.DEPRECATED_$getNodeTriplet(w);w=N.__colSpan;let ue=N.__rowSpan;if(1<w){for(var he=1;he<w;he++)N.insertAfter(a(r.NO_STATUS));N.setColSpan(1)}if(1<ue){let[Oe,Be]=e.DEPRECATED_$computeGridMap(q,N,N),{startColumn:ce,startRow:le}=Be,ve;for(he=1;he<ue;he++){var se=le+he;let Me=Oe[se];ve=(ve||I).getNextSibling(),e.DEPRECATED_$isGridRowNode(ve)||C(125);var Ce=null;for(let Pe=0;Pe<ce;Pe++){let We=Me[Pe],Xe=We.cell;We.startRow===se&&(Ce=Xe),1<Xe.__colSpan&&(Pe+=Xe.__colSpan-1)}if(Ce===null)for(Ce=0;Ce<w;Ce++)J(ve,a(r.NO_STATUS));else for(se=0;se<w;se++)Ce.insertAfter(a(r.NO_STATUS))}N.setRowSpan(1)}},nn.INSERT_TABLE_COMMAND=F,nn.TableCellHeaderStates=r,nn.TableCellNode=o,nn.TableNode=ne,nn.TableRowNode=u,nn.TableSelection=y,nn.applyTableHandlers=function(w,N,I,q){function ue(ce){return ce=w.getCordsFromCellNode(ce,se.grid),w.getCellFromCordsOrThrow(ce.x,ce.y,se.grid)}let he=I.getRootElement();if(he===null)throw Error("No root element.");let se=new y(I,w.getKey()),Ce=I._window||window;N.__lexicalTableSelection=se,N.addEventListener("mousedown",ce=>{setTimeout(()=>{if(ce.button===0&&Ce){var le=v(ce.target);le!==null&&(pe(ce),se.setAnchorCellForSelection(le));var ve=()=>{Ce.removeEventListener("mouseup",ve),Ce.removeEventListener("mousemove",Me)},Me=Pe=>{const We=v(Pe.target);We===null||se.anchorX===We.x&&se.anchorY===We.y||(Pe.preventDefault(),se.setFocusCellForSelection(We))};Ce.addEventListener("mouseup",ve),Ce.addEventListener("mousemove",Me)}},0)});let Oe=ce=>{ce.button===0&&I.update(()=>{const le=e.$getSelection(),ve=ce.target;e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&he.contains(ve)&&se.clearHighlight()})};Ce.addEventListener("mousedown",Oe),se.listenersToRemove.add(()=>Ce.removeEventListener("mousedown",Oe)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_DOWN_COMMAND,ce=>de(I,ce,"down",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_UP_COMMAND,ce=>de(I,ce,"up",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_LEFT_COMMAND,ce=>de(I,ce,"backward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,ce=>de(I,ce,"forward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ESCAPE_COMMAND,ce=>{var le=e.$getSelection();return e.DEPRECATED_$isGridSelection(le)&&(le=t.$findMatchingParent(le.focus.getNode(),l),l(le))?(pe(ce),le.selectEnd(),!0):!1},e.COMMAND_PRIORITY_HIGH));let Be=ce=>()=>{var le=e.$getSelection();if(!X(le,w))return!1;if(e.DEPRECATED_$isGridSelection(le))return se.clearText(),!0;if(e.$isRangeSelection(le)){const Pe=t.$findMatchingParent(le.anchor.getNode(),We=>l(We));if(!l(Pe))return!1;var ve=le.anchor.getNode(),Me=le.focus.getNode();if(ve=w.isParentOf(ve),Me=w.isParentOf(Me),ve&&!Me||Me&&!ve)return se.clearText(),!0;if(ve=(Me=t.$findMatchingParent(le.anchor.getNode(),We=>e.$isElementNode(We)))&&t.$findMatchingParent(Me,We=>e.$isElementNode(We)&&l(We.getParent())),!e.$isElementNode(ve)||!e.$isElementNode(Me))return!1;if(ce===e.DELETE_LINE_COMMAND&&ve.getPreviousSibling()===null)return!0;if((ce===e.DELETE_CHARACTER_COMMAND||ce===e.DELETE_WORD_COMMAND)&&le.isCollapsed()&&le.anchor.offset===0&&Me!==ve){le=Me.getChildren();const We=e.$createParagraphNode();return le.forEach(Xe=>We.append(Xe)),Me.replace(We),Me.getWritable().__parent=Pe.getKey(),!0}}return!1};return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(ce=>{se.listenersToRemove.add(I.registerCommand(ce,Be(ce),e.COMMAND_PRIORITY_CRITICAL))}),N=ce=>{const le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(ce.preventDefault(),ce.stopPropagation(),se.clearText(),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},se.listenersToRemove.add(I.registerCommand(e.KEY_BACKSPACE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.KEY_DELETE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FORMAT_TEXT_COMMAND,ce=>{let le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(se.formatCells(ce),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var ce=e.$getSelection();return X(ce,w)&&(e.DEPRECATED_$isGridSelection(ce)?se.clearHighlight():e.$isRangeSelection(ce)&&(ce=t.$findMatchingParent(ce.anchor.getNode(),le=>l(le)),l(ce))),!1},e.COMMAND_PRIORITY_CRITICAL)),q&&se.listenersToRemove.add(I.registerCommand(e.KEY_TAB_COMMAND,ce=>{var le=e.$getSelection();return!e.$isRangeSelection(le)||!le.isCollapsed()||!X(le,w)||(le=K(le.anchor.getNode()),le===null)?!1:(pe(ce),le=w.getCordsFromCellNode(le,se.grid),M(se,w,le.x,le.y,ce.shiftKey?"backward":"forward"),!0)},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FOCUS_COMMAND,()=>w.isSelected(),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let ce=e.$getSelection(),le=e.$getPreviousSelection();if(e.$isRangeSelection(ce)){let{anchor:Xe,focus:st}=ce;var ve=Xe.getNode(),Me=st.getNode();ve=K(ve),Me=K(Me);var Pe=ve&&w.is(Q(ve)),We=Me&&w.is(Q(Me));let dt=Pe!==We;We=Pe&&We,Pe=ce.isBackward(),dt?(ve=ce.clone(),ve.focus.set(w.getKey(),Pe?0:w.getChildrenSize(),"element"),e.$setSelection(ve),k(I,se)):We&&!ve.is(Me)&&(se.setAnchorCellForSelection(ue(ve)),se.setFocusCellForSelection(ue(Me),!0))}return ce&&!ce.is(le)&&(e.DEPRECATED_$isGridSelection(ce)||e.DEPRECATED_$isGridSelection(le))&&se.gridSelection&&!se.gridSelection.is(le)?(e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey?se.updateTableGridSelection(ce):!e.DEPRECATED_$isGridSelection(ce)&&e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&se.updateTableGridSelection(null),!1):(se.hasHijackedSelectionStyles&&!w.isSelected()?P(I,se):!se.hasHijackedSelectionStyles&&w.isSelected()&&k(I,se),!1)},e.COMMAND_PRIORITY_CRITICAL)),se},nn.getCellFromTarget=v,nn.getTableSelectionFromTableElement=function(w){return w.__lexicalTableSelection},nn}var B_,W_;function sy(){return W_||(W_=1,B_=process.env.NODE_ENV==="development"?$7():D7()),B_}var z_;function k7(){if(z_)return Op;z_=1;var e=dr(),t=sy(),n=yn(),r=Xt(),o=H;function i({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){const[p]=e.useLexicalComposerContext();return o.useEffect(()=>{if(!p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:b,includeHeaders:C})=>{const _=t.$createTableNodeWithDimensions(Number(b),Number(m),C);n.$insertNodeToNearestRoot(_);const y=_.getFirstDescendant();return r.$isTextNode(y)&&y.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[p]),o.useEffect(()=>{const m=new Map,b=_=>{const y=_.getKey(),v=p.getElementByKey(y);if(v&&!m.has(y)){const T=t.applyTableHandlers(_,v,p,u);m.set(y,T)}};p.getEditorState().read(()=>{const _=r.$nodesOfType(t.TableNode);for(const y of _)t.$isTableNode(y)&&b(y)});const C=p.registerMutationListener(t.TableNode,_=>{for(const[y,v]of _)if(v==="created")p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&b(T)});else if(v==="destroyed"){const T=m.get(y);T!==void 0&&(T.removeListeners(),m.delete(y))}});return()=>{C();for(const[,_]of m)_.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(m.getColSpan()>1||m.getRowSpan()>1){const[,,b]=r.DEPRECATED_$getNodeTriplet(m),[C]=r.DEPRECATED_$computeGridMap(b,m,m),_=C.length,y=C[0].length;let v=b.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(v))throw Error("Expected TableNode first child to be a RowNode");const T=[];for(let O=0;O<_;O++){if(O!==0&&(v=v.getNextSibling(),!r.DEPRECATED_$isGridRowNode(v)))throw Error("Expected TableNode first child to be a RowNode");let R=null;for(let k=0;k<y;k++){const P=C[O][k],M=P.cell;if(P.startRow===O&&P.startColumn===k)R=M,T.push(M);else if(M.getColSpan()>1||M.getRowSpan()>1){const Y=t.$createTableCellNode(M.__headerState);R!==null?R.insertAfter(Y):n.$insertFirst(v,Y)}}}for(const O of T)O.setColSpan(1),O.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null}return Op.TablePlugin=i,Op}var Ap={},H_;function M7(){if(H_)return Ap;H_=1;var e=dr(),t=sy(),n=yn(),r=Xt(),o=H;function i(a){let l=new URLSearchParams;l.append("code",a);for(let u=1;u<arguments.length;u++)l.append("v",arguments[u]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return Ap.TablePlugin=function({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){let[p]=e.useLexicalComposerContext();return o.useEffect(()=>(p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||i(10),p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:b,includeHeaders:C})=>(m=t.$createTableNodeWithDimensions(Number(b),Number(m),C),n.$insertNodeToNearestRoot(m),m=m.getFirstDescendant(),r.$isTextNode(m)&&m.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[p]),o.useEffect(()=>{let m=new Map,b=_=>{const y=_.getKey(),v=p.getElementByKey(y);v&&!m.has(y)&&(_=t.applyTableHandlers(_,v,p,u),m.set(y,_))};p.getEditorState().read(()=>{let _=r.$nodesOfType(t.TableNode);for(let y of _)t.$isTableNode(y)&&b(y)});let C=p.registerMutationListener(t.TableNode,_=>{for(const[y,v]of _)v==="created"?p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&b(T)}):v==="destroyed"&&(_=m.get(y),_!==void 0&&(_.removeListeners(),m.delete(y)))});return()=>{C();for(let[,_]of m)_.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(1<m.getColSpan()||1<m.getRowSpan()){var[,,b]=r.DEPRECATED_$getNodeTriplet(m);[m]=r.DEPRECATED_$computeGridMap(b,m,m);let _=m.length,y=m[0].length;if(b=b.getFirstChild(),!r.DEPRECATED_$isGridRowNode(b))throw Error("Expected TableNode first child to be a RowNode");let v=[];for(let T=0;T<_;T++){if(T!==0&&(b=b.getNextSibling(),!r.DEPRECATED_$isGridRowNode(b)))throw Error("Expected TableNode first child to be a RowNode");let O=null;for(let R=0;R<y;R++){var C=m[T][R];let k=C.cell;C.startRow===T&&C.startColumn===R?(O=k,v.push(k)):(1<k.getColSpan()||1<k.getRowSpan())&&(C=t.$createTableCellNode(k.__headerState),O!==null?O.insertAfter(C):n.$insertFirst(b,C))}}for(let T of v)T.setColSpan(1),T.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null},Ap}process.env.NODE_ENV==="development"?k7():M7();var Un={},G_={exports:{}},V_;function MN(){return V_||(V_=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
276
- * Prism: Lightweight, robust, elegant syntax highlighting
277
- *
278
- * @license MIT <https://opensource.org/licenses/MIT>
279
- * @author Lea Verou <https://lea.verou.me>
280
- * @namespace
281
- * @public
282
- */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function R(k){return k instanceof u?new u(k.type,R(k.content),k.alias):Array.isArray(k)?k.map(R):k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(R){return Object.prototype.toString.call(R).slice(8,-1)},objId:function(R){return R.__id||Object.defineProperty(R,"__id",{value:++i}),R.__id},clone:function R(k,P){P=P||{};var M,Y;switch(l.util.type(k)){case"Object":if(Y=l.util.objId(k),P[Y])return P[Y];M={},P[Y]=M;for(var X in k)k.hasOwnProperty(X)&&(M[X]=R(k[X],P));return M;case"Array":return Y=l.util.objId(k),P[Y]?P[Y]:(M=[],P[Y]=M,k.forEach(function(oe,Z){M[Z]=R(oe,P)}),M);default:return k}},getLanguage:function(R){for(;R;){var k=o.exec(R.className);if(k)return k[1].toLowerCase();R=R.parentElement}return"none"},setLanguage:function(R,k){R.className=R.className.replace(RegExp(o,"gi"),""),R.classList.add("language-"+k)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(M){var R=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(R){var k=document.getElementsByTagName("script");for(var P in k)if(k[P].src==R)return k[P]}return null}},isActive:function(R,k,P){for(var M="no-"+k;R;){var Y=R.classList;if(Y.contains(k))return!0;if(Y.contains(M))return!1;R=R.parentElement}return!!P}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(R,k){var P=l.util.clone(l.languages[R]);for(var M in k)P[M]=k[M];return P},insertBefore:function(R,k,P,M){M=M||l.languages;var Y=M[R],X={};for(var oe in Y)if(Y.hasOwnProperty(oe)){if(oe==k)for(var Z in P)P.hasOwnProperty(Z)&&(X[Z]=P[Z]);P.hasOwnProperty(oe)||(X[oe]=Y[oe])}var K=M[R];return M[R]=X,l.languages.DFS(l.languages,function(Q,de){de===K&&Q!=R&&(this[Q]=X)}),X},DFS:function R(k,P,M,Y){Y=Y||{};var X=l.util.objId;for(var oe in k)if(k.hasOwnProperty(oe)){P.call(k,oe,k[oe],M||oe);var Z=k[oe],K=l.util.type(Z);K==="Object"&&!Y[X(Z)]?(Y[X(Z)]=!0,R(Z,P,null,Y)):K==="Array"&&!Y[X(Z)]&&(Y[X(Z)]=!0,R(Z,P,oe,Y))}}},plugins:{},highlightAll:function(R,k){l.highlightAllUnder(document,R,k)},highlightAllUnder:function(R,k,P){var M={callback:P,container:R,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),l.hooks.run("before-all-elements-highlight",M);for(var Y=0,X;X=M.elements[Y++];)l.highlightElement(X,k===!0,M.callback)},highlightElement:function(R,k,P){var M=l.util.getLanguage(R),Y=l.languages[M];l.util.setLanguage(R,M);var X=R.parentElement;X&&X.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(X,M);var oe=R.textContent,Z={element:R,language:M,grammar:Y,code:oe};function K(de){Z.highlightedCode=de,l.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,l.hooks.run("after-highlight",Z),l.hooks.run("complete",Z),P&&P.call(Z.element)}if(l.hooks.run("before-sanity-check",Z),X=Z.element.parentElement,X&&X.nodeName.toLowerCase()==="pre"&&!X.hasAttribute("tabindex")&&X.setAttribute("tabindex","0"),!Z.code){l.hooks.run("complete",Z),P&&P.call(Z.element);return}if(l.hooks.run("before-highlight",Z),!Z.grammar){K(l.util.encode(Z.code));return}if(k&&r.Worker){var Q=new Worker(l.filename);Q.onmessage=function(de){K(de.data)},Q.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else K(l.highlight(Z.code,Z.grammar,Z.language))},highlight:function(R,k,P){var M={code:R,grammar:k,language:P};if(l.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=l.tokenize(M.code,M.grammar),l.hooks.run("after-tokenize",M),u.stringify(l.util.encode(M.tokens),M.language)},tokenize:function(R,k){var P=k.rest;if(P){for(var M in P)k[M]=P[M];delete k.rest}var Y=new b;return C(Y,Y.head,R),m(R,Y,k,Y.head,0),y(Y)},hooks:{all:{},add:function(R,k){var P=l.hooks.all;P[R]=P[R]||[],P[R].push(k)},run:function(R,k){var P=l.hooks.all[R];if(!(!P||!P.length))for(var M=0,Y;Y=P[M++];)Y(k)}},Token:u};r.Prism=l;function u(R,k,P,M){this.type=R,this.content=k,this.alias=P,this.length=(M||"").length|0}u.stringify=function R(k,P){if(typeof k=="string")return k;if(Array.isArray(k)){var M="";return k.forEach(function(K){M+=R(K,P)}),M}var Y={type:k.type,content:R(k.content,P),tag:"span",classes:["token",k.type],attributes:{},language:P},X=k.alias;X&&(Array.isArray(X)?Array.prototype.push.apply(Y.classes,X):Y.classes.push(X)),l.hooks.run("wrap",Y);var oe="";for(var Z in Y.attributes)oe+=" "+Z+'="'+(Y.attributes[Z]||"").replace(/"/g,"&quot;")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+oe+">"+Y.content+"</"+Y.tag+">"};function p(R,k,P,M){R.lastIndex=k;var Y=R.exec(P);if(Y&&M&&Y[1]){var X=Y[1].length;Y.index+=X,Y[0]=Y[0].slice(X)}return Y}function m(R,k,P,M,Y,X){for(var oe in P)if(!(!P.hasOwnProperty(oe)||!P[oe])){var Z=P[oe];Z=Array.isArray(Z)?Z:[Z];for(var K=0;K<Z.length;++K){if(X&&X.cause==oe+","+K)return;var Q=Z[K],de=Q.inside,pe=!!Q.lookbehind,ne=!!Q.greedy,fe=Q.alias;if(ne&&!Q.pattern.global){var U=Q.pattern.toString().match(/[imsuy]*$/)[0];Q.pattern=RegExp(Q.pattern.source,U+"g")}for(var j=Q.pattern||Q,ee=M.next,re=Y;ee!==k.tail&&!(X&&re>=X.reach);re+=ee.value.length,ee=ee.next){var B=ee.value;if(k.length>R.length)return;if(!(B instanceof u)){var W=1,J;if(ne){if(J=p(j,re,R,pe),!J||J.index>=R.length)break;var I=J.index,F=J.index+J[0].length,w=re;for(w+=ee.value.length;I>=w;)ee=ee.next,w+=ee.value.length;if(w-=ee.value.length,re=w,ee.value instanceof u)continue;for(var N=ee;N!==k.tail&&(w<F||typeof N.value=="string");N=N.next)W++,w+=N.value.length;W--,B=R.slice(re,w),J.index-=re}else if(J=p(j,0,B,pe),!J)continue;var I=J.index,q=J[0],ue=B.slice(0,I),he=B.slice(I+q.length),se=re+B.length;X&&se>X.reach&&(X.reach=se);var Ce=ee.prev;ue&&(Ce=C(k,Ce,ue),re+=ue.length),_(k,Ce,W);var Oe=new u(oe,de?l.tokenize(q,de):q,fe,q);if(ee=C(k,Ce,Oe),he&&C(k,ee,he),W>1){var Be={cause:oe+","+K,reach:se};m(R,k,P,ee.prev,re,Be),X&&Be.reach>X.reach&&(X.reach=Be.reach)}}}}}}function b(){var R={value:null,prev:null,next:null},k={value:null,prev:R,next:null};R.next=k,this.head=R,this.tail=k,this.length=0}function C(R,k,P){var M=k.next,Y={value:P,prev:k,next:M};return k.next=Y,M.prev=Y,R.length++,Y}function _(R,k,P){for(var M=k.next,Y=0;Y<P&&M!==R.tail;Y++)M=M.next;k.next=M,M.prev=k,R.length-=Y}function y(R){for(var k=[],P=R.head.next;P!==R.tail;)k.push(P.value),P=P.next;return k}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(R){var k=JSON.parse(R.data),P=k.language,M=k.code,Y=k.immediateClose;r.postMessage(l.highlight(M,l.languages[P],P)),Y&&r.close()},!1)),l;var v=l.util.currentScript();v&&(l.filename=v.src,v.hasAttribute("data-manual")&&(l.manual=!0));function T(){l.manual||l.highlightAll()}if(!l.manual){var O=document.readyState;O==="loading"||O==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",T):window.requestAnimationFrame?window.requestAnimationFrame(T):window.setTimeout(T,16)}return l}(t);e.exports&&(e.exports=n),typeof vb<"u"&&(vb.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(v,T){return"✖ Error "+v+" while fetching file: "+T},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",u="loading",p="loaded",m="failed",b="pre[data-src]:not(["+l+'="'+p+'"]):not(['+l+'="'+u+'"])';function C(v,T,O){var R=new XMLHttpRequest;R.open("GET",v,!0),R.onreadystatechange=function(){R.readyState==4&&(R.status<400&&R.responseText?T(R.responseText):R.status>=400?O(o(R.status,R.statusText)):O(i))},R.send(null)}function _(v){var T=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(T){var O=Number(T[1]),R=T[2],k=T[3];return R?k?[O,Number(k)]:[O,void 0]:[O,O]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+b}),n.hooks.add("before-sanity-check",function(v){var T=v.element;if(T.matches(b)){v.code="",T.setAttribute(l,u);var O=T.appendChild(document.createElement("CODE"));O.textContent=r;var R=T.getAttribute("data-src"),k=v.language;if(k==="none"){var P=(/\.(\w+)$/.exec(R)||[,"none"])[1];k=a[P]||P}n.util.setLanguage(O,k),n.util.setLanguage(T,k);var M=n.plugins.autoloader;M&&M.loadLanguages(k),C(R,function(Y){T.setAttribute(l,p);var X=_(T.getAttribute("data-range"));if(X){var oe=Y.split(/\r\n?|\n/g),Z=X[0],K=X[1]==null?oe.length:X[1];Z<0&&(Z+=oe.length),Z=Math.max(0,Math.min(Z-1,oe.length)),K<0&&(K+=oe.length),K=Math.max(0,Math.min(K,oe.length)),Y=oe.slice(Z,K).join(`
283
- `),T.hasAttribute("data-start")||T.setAttribute("data-start",String(Z+1))}O.textContent=Y,n.highlightElement(O)},function(Y){T.setAttribute(l,m),O.textContent=Y})}}),n.plugins.fileHighlight={highlight:function(v){for(var T=(v||document).querySelectorAll(b),O=0,R;R=T[O++];)n.highlightElement(R)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(G_)),G_.exports}var P7={},K_;function PN(){return K_||(K_=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),P7}var I7={},U_;function IN(){return U_||(U_=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),I7}var L7={},Y_;function LN(){return Y_||(Y_=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),L7}var F7={},q_;function FN(){return q_||(q_=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(m){return m=m.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(b){m!==b&&(e.languages.markdown[m].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function b(C){if(!(!C||typeof C=="string"))for(var _=0,y=C.length;_<y;_++){var v=C[_];if(v.type!=="code"){b(v.content);continue}var T=v.content[1],O=v.content[3];if(T&&O&&T.type==="code-language"&&O.type==="code-block"&&typeof T.content=="string"){var R=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");R=(/[a-z][\w-]*/i.exec(R)||[""])[0].toLowerCase();var k="language-"+R;O.alias?typeof O.alias=="string"?O.alias=[O.alias,k]:O.alias.push(k):O.alias=[k]}}}b(m.tokens)}),e.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var b="",C=0,_=m.classes.length;C<_;C++){var y=m.classes[C],v=/language-(.+)/.exec(y);if(v){b=v[1];break}}var T=e.languages[b];if(T)m.content=e.highlight(p(m.content),T,b);else if(b&&b!=="none"&&e.plugins.autoloader){var O="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=O,e.plugins.autoloader.loadLanguages(b,function(){var R=document.getElementById(O);R&&(R.innerHTML=e.highlight(R.textContent,e.languages[b],b))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function p(m){var b=m.replace(a,"");return b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(C,_){if(_=_.toLowerCase(),_[0]==="#"){var y;return _[1]==="x"?y=parseInt(_.slice(2),16):y=Number(_.slice(1)),u(y)}else{var v=l[_];return v||C}}),b}e.languages.md=e.languages.markdown}(Prism)),F7}var j7={},Z_;function jN(){return Z_||(Z_=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),j7}var B7={},J_;function BN(){return J_||(J_=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),B7}var W7={},X_;function WN(){return X_||(X_=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),W7}var z7={},Q_;function zN(){return Q_||(Q_=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),z7}var H7={},ex;function HN(){return ex||(ex=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),H7}var G7={},tx;function GN(){return tx||(tx=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),G7}var V7={},nx;function VN(){return nx||(nx=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift})),V7}var K7={},rx;function KN(){return rx||(rx=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),K7}var U7={},ox;function UN(){return ox||(ox=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),U7}var Y7={},ix;function YN(){return ix||(ix=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),Y7}var ax;function q7(){if(ax)return Un;ax=1;var e=MN();PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN(),HN(),GN(),VN(),KN(),UN(),YN();var t=yn(),n=Xt();const r=ce=>ce!=null&&e.languages.hasOwnProperty(ce)?ce:void 0;function o(ce,le){for(const ve of ce.childNodes){if(t.isHTMLElement(ve)&&ve.tagName===le)return!0;o(ve,le)}return!1}const i="data-highlight-language";class a extends n.ElementNode{static getType(){return"code"}static clone(le){return new a(le.__language,le.__key)}constructor(le,ve){super(ve),this.__language=r(le)}createDOM(le){const ve=document.createElement("code");t.addClassNamesToElement(ve,le.theme.code),ve.setAttribute("spellcheck","false");const Me=this.getLanguage();return Me&&ve.setAttribute(i,Me),ve}updateDOM(le,ve,Me){const Pe=this.__language,We=le.__language;return Pe?Pe!==We&&ve.setAttribute(i,Pe):We&&ve.removeAttribute(i),!1}exportDOM(){const le=document.createElement("pre");le.setAttribute("spellcheck","false");const ve=this.getLanguage();return ve&&le.setAttribute(i,ve),{element:le}}static importDOM(){return{code:le=>le.textContent!=null&&(/\r?\n/.test(le.textContent)||o(le,"BR"))?{conversion:p,priority:1}:null,div:le=>({conversion:m,priority:1}),pre:le=>({conversion:p,priority:0}),table:le=>O(le)?{conversion:b,priority:3}:null,td:le=>{const ve=le,Me=ve.closest("table");return T(ve)?{conversion:_,priority:3}:Me&&O(Me)?{conversion:C,priority:3}:null},tr:le=>{const ve=le.closest("table");return ve&&O(ve)?{conversion:C,priority:3}:null}}}static importJSON(le){const ve=l(le.language);return ve.setFormat(le.format),ve.setIndent(le.indent),ve.setDirection(le.direction),ve}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(le,ve=!0){const Me=this.getChildren(),Pe=Me.length;if(Pe>=2&&Me[Pe-1].getTextContent()===`
284
- `&&Me[Pe-2].getTextContent()===`
285
- `&&le.isCollapsed()&&le.anchor.key===this.__key&&le.anchor.offset===Pe){Me[Pe-1].remove(),Me[Pe-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,ve),dt}const{anchor:We,focus:Xe}=le,st=(We.isBefore(Xe)?We:Xe).getNode();if(n.$isTextNode(st)){let dt=pe(st);const Ct=[];for(;;)if(n.$isTabNode(dt))Ct.push(n.$createTabNode()),dt=dt.getNextSibling();else if(de(dt)){let ze=0;const tt=dt.getTextContent(),ut=dt.getTextContentSize();for(;ze<ut&&tt[ze]===" ";ze++);if(ze!==0&&Ct.push(Q(" ".repeat(ze))),ze!==ut)break;dt=dt.getNextSibling()}else break;const Se=st.splitText(We.offset)[0],me=We.offset===0?0:1,_e=Se.getIndexWithinParent()+me,De=st.getParentOrThrow(),Fe=[n.$createLineBreakNode(),...Ct];De.splice(_e,0,Fe);const ke=Ct[Ct.length-1];ke?ke.select():We.offset===0?Se.selectPrevious():Se.getNextSibling().selectNext(0,0)}if(u(st)){const{offset:dt}=le.anchor;st.splice(dt,0,[n.$createLineBreakNode()]),st.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const le=n.$createParagraphNode();return this.getChildren().forEach(ve=>le.append(ve)),this.replace(le),!0}setLanguage(le){const ve=this.getWritable();ve.__language=r(le)}getLanguage(){return this.getLatest().__language}}function l(ce){return n.$applyNodeReplacement(new a(ce))}function u(ce){return ce instanceof a}function p(ce){let le;return t.isHTMLElement(ce)&&(le=ce.getAttribute(i)),{node:l(le)}}function m(ce){const le=ce,ve=y(le);return!ve&&!v(le)?{node:null}:{after:Me=>{const Pe=ce.parentNode;return Pe!=null&&ce!==Pe.lastChild&&Me.push(n.$createLineBreakNode()),Me},node:ve?l():null}}function b(){return{node:l()}}function C(){return{node:null}}function _(ce){const le=ce;return{after:ve=>(le.parentNode&&le.parentNode.nextSibling&&ve.push(n.$createLineBreakNode()),ve),node:null}}function y(ce){return ce.style.fontFamily.match("monospace")!==null}function v(ce){let le=ce.parentElement;for(;le!==null;){if(y(le))return!0;le=le.parentElement}return!1}function T(ce){return ce.classList.contains("js-file-line")}function O(ce){return ce.classList.contains("js-file-line-container")}const R="javascript",k={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},P={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function M(ce){return P[ce]||ce}function Y(ce){const le=M(ce);return k[le]||le}const X=()=>R,oe=()=>Object.keys(e.languages).filter(ce=>typeof e.languages[ce]!="function").sort();class Z extends n.TextNode{constructor(le,ve,Me){super(le,Me),this.__highlightType=ve}static getType(){return"code-highlight"}static clone(le){return new Z(le.__text,le.__highlightType||void 0,le.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(le){const ve=super.createDOM(le),Me=K(le.theme,this.__highlightType);return t.addClassNamesToElement(ve,Me),ve}updateDOM(le,ve,Me){const Pe=super.updateDOM(le,ve,Me),We=K(Me.theme,le.__highlightType),Xe=K(Me.theme,this.__highlightType);return We!==Xe&&(We&&t.removeClassNamesFromElement(ve,We),Xe&&t.addClassNamesToElement(ve,Xe)),Pe}static importJSON(le){const ve=Q(le.text,le.highlightType);return ve.setFormat(le.format),ve.setDetail(le.detail),ve.setMode(le.mode),ve.setStyle(le.style),ve}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(le){return this}isParentRequired(){return!0}createParentElementNode(){return l()}}function K(ce,le){return le&&ce&&ce.codeHighlight&&ce.codeHighlight[le]}function Q(ce,le){return n.$applyNodeReplacement(new Z(ce,le))}function de(ce){return ce instanceof Z}function pe(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getPreviousSibling();return le}function ne(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getNextSibling();return le}const fe={defaultLanguage:R,tokenize(ce,le){return e.tokenize(ce,e.languages[le||""]||e.languages[this.defaultLanguage])}};function U(ce,le){let ve=null,Me=null,Pe=ce,We=le,Xe=ce.getTextContent();for(;;){if(We===0){if(Pe=Pe.getPreviousSibling(),Pe===null)break;if(!(de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Pe)){ve={node:Pe,offset:1};break}We=Math.max(0,Pe.getTextContentSize()-1),Xe=Pe.getTextContent()}else We--;const dt=Xe[We];de(Pe)&&dt!==" "&&(Me={node:Pe,offset:We})}if(Me!==null)return Me;let st=null;if(le<ce.getTextContentSize())de(ce)&&(st=ce.getTextContent()[le]);else{const dt=ce.getNextSibling();de(dt)&&(st=dt.getTextContent()[0])}if(st!==null&&st!==" ")return ve;{const dt=j(ce,le);return dt!==null?dt:ve}}function j(ce,le){let ve=ce,Me=le,Pe=ce.getTextContent(),We=ce.getTextContentSize();for(;;){if(!de(ve)||Me===We){if(ve=ve.getNextSibling(),ve===null||n.$isLineBreakNode(ve))return null;de(ve)&&(Me=0,Pe=ve.getTextContent(),We=ve.getTextContentSize())}if(de(ve)){if(Pe[Me]!==" ")return{node:ve,offset:Me};Me++}}}function ee(ce){const le=ne(ce);if(n.$isLineBreakNode(le))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return le}function re(ce,le,ve){const Me=ce.getParent();u(Me)?J(Me,le,ve):de(ce)&&ce.replace(n.$createTextNode(ce.__text))}function B(ce,le){const ve=le.getElementByKey(ce.getKey());if(ve===null)return;const Me=ce.getChildren(),Pe=Me.length;if(Pe===ve.__cachedChildrenLength)return;ve.__cachedChildrenLength=Pe;let We="1",Xe=1;for(let st=0;st<Pe;st++)n.$isLineBreakNode(Me[st])&&(We+=`
286
- `+ ++Xe);ve.setAttribute("data-gutter",We)}const W=new Set;function J(ce,le,ve){const Me=ce.getKey();W.has(Me)||(W.add(Me),ce.getLanguage()===void 0&&ce.setLanguage(ve.defaultLanguage),le.update(()=>{w(Me,()=>{const Pe=n.$getNodeByKey(Me);if(!u(Pe)||!Pe.isAttached())return!1;const We=Pe.getTextContent(),Xe=ve.tokenize(We,Pe.getLanguage()||ve.defaultLanguage),st=F(Xe),dt=N(Pe.getChildren(),st),{from:Ct,to:Se,nodesForReplacement:me}=dt;return Ct!==Se||me.length?(ce.splice(Ct,Se-Ct,me),!0):!1})},{onUpdate:()=>{W.delete(Me)},skipTransforms:!0}))}function F(ce,le){const ve=[];for(const Me of ce)if(typeof Me=="string"){const Pe=Me.split(/(\n|\t)/),We=Pe.length;for(let Xe=0;Xe<We;Xe++){const st=Pe[Xe];st===`
287
- `||st===`\r
288
- `?ve.push(n.$createLineBreakNode()):st===" "?ve.push(n.$createTabNode()):st.length>0&&ve.push(Q(st,le))}}else{const{content:Pe}=Me;typeof Pe=="string"?ve.push(...F([Pe],Me.type)):Array.isArray(Pe)&&ve.push(...F(Pe,Me.type))}return ve}function w(ce,le){const ve=n.$getNodeByKey(ce);if(!u(ve)||!ve.isAttached())return;const Me=n.$getSelection();if(!n.$isRangeSelection(Me)){le();return}const Pe=Me.anchor,We=Pe.offset,Xe=Pe.type==="element"&&n.$isLineBreakNode(ve.getChildAtIndex(Pe.offset-1));let st=0;if(!Xe){const dt=Pe.getNode();st=We+dt.getPreviousSiblings().reduce((Ct,Se)=>Ct+Se.getTextContentSize(),0)}if(le()){if(Xe){Pe.getNode().select(We,We);return}ve.getChildren().some(dt=>{const Ct=n.$isTextNode(dt);if(Ct||n.$isLineBreakNode(dt)){const Se=dt.getTextContentSize();if(Ct&&Se>=st)return dt.select(st,st),!0;st-=Se}return!1})}}function N(ce,le){let ve=0;for(;ve<ce.length&&I(ce[ve],le[ve]);)ve++;const Me=ce.length,Pe=le.length,We=Math.min(Me,Pe)-ve;let Xe=0;for(;Xe<We;)if(Xe++,!I(ce[Me-Xe],le[Pe-Xe])){Xe--;break}const st=ve,dt=Me-Xe,Ct=le.slice(ve,Pe-Xe);return{from:st,nodesForReplacement:Ct,to:dt}}function I(ce,le){return de(ce)&&de(le)&&ce.__text===le.__text&&ce.__highlightType===le.__highlightType||n.$isTabNode(ce)&&n.$isTabNode(le)||n.$isLineBreakNode(ce)&&n.$isLineBreakNode(le)}function q(ce){if(!n.$isRangeSelection(ce))return!1;const le=ce.anchor.getNode(),ve=ce.focus.getNode();if(le.is(ve)&&u(le))return!0;const Me=le.getParent();return u(Me)&&Me.is(ve.getParent())}function ue(ce){const le=ce.getNodes(),ve=[[]];if(le.length===1&&u(le[0]))return ve;let Me=ve[0];for(let Pe=0;Pe<le.length;Pe++){const We=le[Pe];if(!(de(We)||n.$isTabNode(We)||n.$isLineBreakNode(We)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(We)?Pe!==0&&Me.length>0&&(Me=[],ve.push(Me)):Me.push(We)}return ve}function he(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return null;const ve=ce?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,Me=ce?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(le).length>1)return ve;const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(u(Pe))return ve;const We=pe(Pe),Xe=ne(Pe),st=le.anchor,dt=le.focus;let Ct,Se;return dt.isBefore(st)?(Ct=dt,Se=st):(Ct=st,Se=dt),We!==null&&Xe!==null&&Ct.key===We.getKey()&&Ct.offset===0&&Se.key===Xe.getKey()&&Se.offset===Xe.getTextContentSize()?ve:Me}function se(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return!1;const ve=ue(le),Me=ve.length;if(ve.length>1){for(let Xe=0;Xe<Me;Xe++){const st=ve[Xe];if(st.length>0){let dt=st[0];Xe===0&&(dt=pe(dt)),dt!==null&&(ce===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(u(Pe))return ce===n.INDENT_CONTENT_COMMAND&&le.insertNodes([n.$createTabNode()]),!0;const We=pe(Pe);if(We===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return ce===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(We)?We.insertAfter(n.$createTabNode()):We.insertBefore(n.$createTabNode()):n.$isTabNode(We)&&We.remove(),!0}function Ce(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.offset,Xe=Pe.offset,st=Me.getNode(),dt=Pe.getNode(),Ct=ce===n.KEY_ARROW_UP_COMMAND;if(!q(ve)||!(de(st)||n.$isTabNode(st))||!(de(dt)||n.$isTabNode(dt)))return!1;if(!le.altKey){if(ve.isCollapsed()){const tt=st.getParentOrThrow();if(Ct&&We===0&&st.getPreviousSibling()===null){if(tt.getPreviousSibling()===null)return tt.selectPrevious(),le.preventDefault(),!0}else if(!Ct&&We===st.getTextContentSize()&&st.getNextSibling()===null&&tt.getNextSibling()===null)return tt.selectNext(),le.preventDefault(),!0}return!1}let Se,me;if(st.isBefore(dt)?(Se=pe(st),me=ne(dt)):(Se=pe(dt),me=ne(st)),Se==null||me==null)return!1;const _e=Se.getNodesBetween(me);for(let tt=0;tt<_e.length;tt++){const ut=_e[tt];if(!de(ut)&&!n.$isTabNode(ut)&&!n.$isLineBreakNode(ut))return!1}le.preventDefault(),le.stopPropagation();const De=Ct?Se.getPreviousSibling():me.getNextSibling();if(!n.$isLineBreakNode(De))return!0;const Fe=Ct?De.getPreviousSibling():De.getNextSibling();if(Fe==null)return!0;let ze=(de(Fe)||n.$isTabNode(Fe)||n.$isLineBreakNode(Fe)?Ct?pe(Fe):ne(Fe):null)??Fe;return De.remove(),_e.forEach(tt=>tt.remove()),ce===n.KEY_ARROW_UP_COMMAND?(_e.forEach(tt=>ze.insertBefore(tt)),ze.insertBefore(De)):(ze.insertAfter(De),ze=De,_e.forEach(tt=>{ze.insertAfter(tt),ze=tt})),ve.setTextNodeRange(st,We,dt,Xe),!0}function Oe(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.getNode(),Xe=Pe.getNode(),st=ce===n.MOVE_TO_START;if(!(de(We)||n.$isTabNode(We))||!(de(Xe)||n.$isTabNode(Xe)))return!1;if(st){const dt=U(Xe,Pe.offset);if(dt!==null){const{node:Ct,offset:Se}=dt;n.$isLineBreakNode(Ct)?Ct.selectNext(0,0):ve.setTextNodeRange(Ct,Se,Ct,Se)}else Xe.getParentOrThrow().selectStart()}else ee(Xe).select();return le.preventDefault(),le.stopPropagation(),!0}function Be(ce,le){if(!ce.hasNodes([a,Z]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return le==null&&(le=fe),t.mergeRegister(ce.registerMutationListener(a,ve=>{ce.update(()=>{for(const[Me,Pe]of ve)if(Pe!=="destroyed"){const We=n.$getNodeByKey(Me);We!==null&&B(We,ce)}})}),ce.registerNodeTransform(a,ve=>J(ve,ce,le)),ce.registerNodeTransform(n.TextNode,ve=>re(ve,ce,le)),ce.registerNodeTransform(Z,ve=>re(ve,ce,le)),ce.registerCommand(n.KEY_TAB_COMMAND,ve=>{const Me=he(ve.shiftKey);return Me===null?!1:(ve.preventDefault(),ce.dispatchCommand(Me,void 0),!0)},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INSERT_TAB_COMMAND,()=>{const ve=n.$getSelection();return q(ve)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INDENT_CONTENT_COMMAND,ve=>se(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.OUTDENT_CONTENT_COMMAND,ve=>se(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_UP_COMMAND,ve=>Ce(n.KEY_ARROW_UP_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_DOWN_COMMAND,ve=>Ce(n.KEY_ARROW_DOWN_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_END,ve=>Oe(n.MOVE_TO_END,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_START,ve=>Oe(n.MOVE_TO_START,ve),n.COMMAND_PRIORITY_LOW))}return Un.$createCodeHighlightNode=Q,Un.$createCodeNode=l,Un.$isCodeHighlightNode=de,Un.$isCodeNode=u,Un.CODE_LANGUAGE_FRIENDLY_NAME_MAP=k,Un.CODE_LANGUAGE_MAP=P,Un.CodeHighlightNode=Z,Un.CodeNode=a,Un.DEFAULT_CODE_LANGUAGE=R,Un.PrismTokenizer=fe,Un.getCodeLanguages=oe,Un.getDefaultCodeLanguage=X,Un.getEndOfCodeInLine=ee,Un.getFirstCodeNodeOfLine=pe,Un.getLanguageFriendlyName=Y,Un.getLastCodeNodeOfLine=ne,Un.getStartOfCodeInLine=U,Un.normalizeCodeLang=M,Un.registerCodeHighlighting=Be,Un}var Yn={},sx;function Z7(){if(sx)return Yn;sx=1;var e=MN();PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN(),HN(),GN(),VN(),KN(),UN(),YN();var t=yn(),n=Xt();let r=F=>F!=null&&e.languages.hasOwnProperty(F)?F:void 0;function o(F,w){for(let N of F.childNodes){if(t.isHTMLElement(N)&&N.tagName===w)return!0;o(N,w)}return!1}class i extends n.ElementNode{static getType(){return"code"}static clone(w){return new i(w.__language,w.__key)}constructor(w,N){super(N),this.__language=r(w)}createDOM(w){let N=document.createElement("code");return t.addClassNamesToElement(N,w.theme.code),N.setAttribute("spellcheck","false"),(w=this.getLanguage())&&N.setAttribute("data-highlight-language",w),N}updateDOM(w,N){let I=this.__language;return w=w.__language,I?I!==w&&N.setAttribute("data-highlight-language",I):w&&N.removeAttribute("data-highlight-language"),!1}exportDOM(){let w=document.createElement("pre");w.setAttribute("spellcheck","false");let N=this.getLanguage();return N&&w.setAttribute("data-highlight-language",N),{element:w}}static importDOM(){return{code:w=>w.textContent!=null&&(/\r?\n/.test(w.textContent)||o(w,"BR"))?{conversion:u,priority:1}:null,div:()=>({conversion:p,priority:1}),pre:()=>({conversion:u,priority:0}),table:w=>y(w)?{conversion:m,priority:3}:null,td:w=>{let N=w.closest("table");return w.classList.contains("js-file-line")?{conversion:C,priority:3}:N&&y(N)?{conversion:b,priority:3}:null},tr:w=>(w=w.closest("table"))&&y(w)?{conversion:b,priority:3}:null}}static importJSON(w){let N=a(w.language);return N.setFormat(w.format),N.setIndent(w.indent),N.setDirection(w.direction),N}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(w,N=!0){var I=this.getChildren(),q=I.length;if(2<=q&&I[q-1].getTextContent()===`
289
- `&&I[q-2].getTextContent()===`
290
- `&&w.isCollapsed()&&w.anchor.key===this.__key&&w.anchor.offset===q)return I[q-1].remove(),I[q-2].remove(),w=n.$createParagraphNode(),this.insertAfter(w,N),w;let{anchor:ue,focus:he}=w;if(N=(ue.isBefore(he)?ue:he).getNode(),n.$isTextNode(N)){for(q=Y(N),I=[];;)if(n.$isTabNode(q))I.push(n.$createTabNode()),q=q.getNextSibling();else if(M(q)){for(var se=0,Ce=q.getTextContent(),Oe=q.getTextContentSize();se<Oe&&Ce[se]===" ";se++);if(se!==0&&I.push(P(" ".repeat(se))),se!==Oe)break;q=q.getNextSibling()}else break;q=N.splitText(ue.offset)[0],se=ue.offset===0?0:1,se=q.getIndexWithinParent()+se,Ce=N.getParentOrThrow(),Oe=[n.$createLineBreakNode(),...I],Ce.splice(se,0,Oe),(I=I[I.length-1])?I.select():ue.offset===0?q.selectPrevious():q.getNextSibling().selectNext(0,0)}return l(N)&&({offset:w}=w.anchor,N.splice(w,0,[n.$createLineBreakNode()]),N.select(w+1,w+1)),null}canIndent(){return!1}collapseAtStart(){let w=n.$createParagraphNode();return this.getChildren().forEach(N=>w.append(N)),this.replace(w),!0}setLanguage(w){this.getWritable().__language=r(w)}getLanguage(){return this.getLatest().__language}}function a(F){return n.$applyNodeReplacement(new i(F))}function l(F){return F instanceof i}function u(F){let w;return t.isHTMLElement(F)&&(w=F.getAttribute("data-highlight-language")),{node:a(w)}}function p(F){let w=F.style.fontFamily.match("monospace")!==null;return w||_(F)?{after:N=>{let I=F.parentNode;return I!=null&&F!==I.lastChild&&N.push(n.$createLineBreakNode()),N},node:w?a():null}:{node:null}}function m(){return{node:a()}}function b(){return{node:null}}function C(F){return{after:w=>(F.parentNode&&F.parentNode.nextSibling&&w.push(n.$createLineBreakNode()),w),node:null}}function _(F){for(F=F.parentElement;F!==null;){if(F.style.fontFamily.match("monospace")!==null)return!0;F=F.parentElement}return!1}function y(F){return F.classList.contains("js-file-line-container")}let v={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},T={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function O(F){return T[F]||F}class R extends n.TextNode{constructor(w,N,I){super(w,I),this.__highlightType=N}static getType(){return"code-highlight"}static clone(w){return new R(w.__text,w.__highlightType||void 0,w.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(w){let N=super.createDOM(w);return w=k(w.theme,this.__highlightType),t.addClassNamesToElement(N,w),N}updateDOM(w,N,I){let q=super.updateDOM(w,N,I);return w=k(I.theme,w.__highlightType),I=k(I.theme,this.__highlightType),w!==I&&(w&&t.removeClassNamesFromElement(N,w),I&&t.addClassNamesToElement(N,I)),q}static importJSON(w){let N=P(w.text,w.highlightType);return N.setFormat(w.format),N.setDetail(w.detail),N.setMode(w.mode),N.setStyle(w.style),N}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function k(F,w){return w&&F&&F.codeHighlight&&F.codeHighlight[w]}function P(F,w){return n.$applyNodeReplacement(new R(F,w))}function M(F){return F instanceof R}function Y(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getPreviousSibling();return w}function X(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getNextSibling();return w}let oe={defaultLanguage:"javascript",tokenize(F,w){return e.tokenize(F,e.languages[w||""]||e.languages[this.defaultLanguage])}};function Z(F,w){let N=null;var I=null,q=F;let ue=w,he=F.getTextContent();for(;;){if(ue===0){if(q=q.getPreviousSibling(),q===null)break;if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(q)){N={node:q,offset:1};break}ue=Math.max(0,q.getTextContentSize()-1),he=q.getTextContent()}else ue--;let se=he[ue];M(q)&&se!==" "&&(I={node:q,offset:ue})}if(I!==null)return I;if(I=null,w<F.getTextContentSize()?M(F)&&(I=F.getTextContent()[w]):(q=F.getNextSibling(),M(q)&&(I=q.getTextContent()[0])),I!==null&&I!==" ")return N;e:for(I=F,q=F.getTextContent(),F=F.getTextContentSize();;){if(!M(I)||w===F){if(I=I.getNextSibling(),I===null||n.$isLineBreakNode(I)){F=null;break e}M(I)&&(w=0,q=I.getTextContent(),F=I.getTextContentSize())}if(M(I)){if(q[w]!==" "){F={node:I,offset:w};break e}w++}}return F!==null?F:N}function K(F){if(F=X(F),n.$isLineBreakNode(F))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return F}function Q(F,w,N){let I=F.getParent();l(I)?pe(I,w,N):M(F)&&F.replace(n.$createTextNode(F.__text))}let de=new Set;function pe(F,w,N){let I=F.getKey();de.has(I)||(de.add(I),F.getLanguage()===void 0&&F.setLanguage(N.defaultLanguage),w.update(()=>{fe(I,()=>{var q=n.$getNodeByKey(I);if(!l(q)||!q.isAttached())return!1;var ue=q.getTextContent();ue=N.tokenize(ue,q.getLanguage()||N.defaultLanguage),ue=ne(ue);var he=q.getChildren();for(q=0;q<he.length&&U(he[q],ue[q]);)q++;var se=he.length;let Ce=ue.length,Oe=Math.min(se,Ce)-q,Be=0;for(;Be<Oe;)if(Be++,!U(he[se-Be],ue[Ce-Be])){Be--;break}he=q,se-=Be,ue=ue.slice(q,Ce-Be);let{from:ce,to:le,nodesForReplacement:ve}={from:he,nodesForReplacement:ue,to:se};return ce!==le||ve.length?(F.splice(ce,le-ce,ve),!0):!1})},{onUpdate:()=>{de.delete(I)},skipTransforms:!0}))}function ne(F,w){let N=[];for(let I of F)if(typeof I=="string"){F=I.split(/(\n|\t)/);let q=F.length;for(let ue=0;ue<q;ue++){let he=F[ue];he===`
291
- `||he===`\r
292
- `?N.push(n.$createLineBreakNode()):he===" "?N.push(n.$createTabNode()):0<he.length&&N.push(P(he,w))}}else({content:F}=I),typeof F=="string"?N.push(...ne([F],I.type)):Array.isArray(F)&&N.push(...ne(F,I.type));return N}function fe(F,w){if(F=n.$getNodeByKey(F),l(F)&&F.isAttached()){var N=n.$getSelection();if(n.$isRangeSelection(N)){N=N.anchor;var I=N.offset,q=N.type==="element"&&n.$isLineBreakNode(F.getChildAtIndex(N.offset-1)),ue=0;if(!q){let he=N.getNode();ue=I+he.getPreviousSiblings().reduce((se,Ce)=>se+Ce.getTextContentSize(),0)}w()&&(q?N.getNode().select(I,I):F.getChildren().some(he=>{let se=n.$isTextNode(he);if(se||n.$isLineBreakNode(he)){let Ce=he.getTextContentSize();if(se&&Ce>=ue)return he.select(ue,ue),!0;ue-=Ce}return!1}))}else w()}}function U(F,w){return M(F)&&M(w)&&F.__text===w.__text&&F.__highlightType===w.__highlightType||n.$isTabNode(F)&&n.$isTabNode(w)||n.$isLineBreakNode(F)&&n.$isLineBreakNode(w)}function j(F){if(!n.$isRangeSelection(F))return!1;var w=F.anchor.getNode();return F=F.focus.getNode(),w.is(F)&&l(w)?!0:(w=w.getParent(),l(w)&&w.is(F.getParent()))}function ee(F){F=F.getNodes();let w=[[]];if(F.length===1&&l(F[0]))return w;let N=w[0];for(let I=0;I<F.length;I++){let q=F[I];if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(q)?I!==0&&0<N.length&&(N=[],w.push(N)):N.push(q)}return w}function re(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return null;let N=F?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(F=F?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<ee(w).length)return N;var I=w.getNodes()[0];if(!(l(I)||M(I)||n.$isTabNode(I)||n.$isLineBreakNode(I)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(l(I))return N;let q=Y(I);I=X(I);var ue=w.anchor;let he=w.focus;return he.isBefore(ue)?w=he:(w=ue,ue=he),q!==null&&I!==null&&w.key===q.getKey()&&w.offset===0&&ue.key===I.getKey()&&ue.offset===I.getTextContentSize()?N:F}function B(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return!1;var N=ee(w);let I=N.length;if(1<N.length){for(w=0;w<I;w++){var q=N[w];0<q.length&&(q=q[0],w===0&&(q=Y(q)),q!==null&&(F===n.INDENT_CONTENT_COMMAND?q.insertBefore(n.$createTabNode()):n.$isTabNode(q)&&q.remove()))}return!0}if(N=w.getNodes()[0],!(l(N)||M(N)||n.$isTabNode(N)||n.$isLineBreakNode(N)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(l(N))return F===n.INDENT_CONTENT_COMMAND&&w.insertNodes([n.$createTabNode()]),!0;if(N=Y(N),N===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return F===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(N)?N.insertAfter(n.$createTabNode()):N.insertBefore(n.$createTabNode()):n.$isTabNode(N)&&N.remove(),!0}function W(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N,ue=I.offset,he=q.offset,se=I.getNode(),Ce=q.getNode();var Oe=F===n.KEY_ARROW_UP_COMMAND;if(!j(N)||!M(se)&&!n.$isTabNode(se)||!M(Ce)&&!n.$isTabNode(Ce))return!1;if(!w.altKey){if(N.isCollapsed()){if(F=se.getParentOrThrow(),Oe&&ue===0&&se.getPreviousSibling()===null){if(F.getPreviousSibling()===null)return F.selectPrevious(),w.preventDefault(),!0}else if(!Oe&&ue===se.getTextContentSize()&&se.getNextSibling()===null&&F.getNextSibling()===null)return F.selectNext(),w.preventDefault(),!0}return!1}let Be;if(se.isBefore(Ce)){var ce=Y(se);Be=X(Ce)}else ce=Y(Ce),Be=X(se);if(ce==null||Be==null)return!1;let le=ce.getNodesBetween(Be);for(let Me=0;Me<le.length;Me++){let Pe=le[Me];if(!M(Pe)&&!n.$isTabNode(Pe)&&!n.$isLineBreakNode(Pe))return!1}if(w.preventDefault(),w.stopPropagation(),w=Oe?ce.getPreviousSibling():Be.getNextSibling(),!n.$isLineBreakNode(w)||(ce=Oe?w.getPreviousSibling():w.getNextSibling(),ce==null))return!0;Oe=M(ce)||n.$isTabNode(ce)||n.$isLineBreakNode(ce)?Oe?Y(ce):X(ce):null;let ve=Oe??ce;return w.remove(),le.forEach(Me=>Me.remove()),F===n.KEY_ARROW_UP_COMMAND?(le.forEach(Me=>ve.insertBefore(Me)),ve.insertBefore(w)):(ve.insertAfter(w),ve=w,le.forEach(Me=>{ve.insertAfter(Me),ve=Me})),N.setTextNodeRange(se,ue,Ce,he),!0}function J(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N;var ue=I.getNode();let he=q.getNode();if(F=F===n.MOVE_TO_START,!M(ue)&&!n.$isTabNode(ue)||!M(he)&&!n.$isTabNode(he))return!1;if(F)if(ue=Z(he,q.offset),ue!==null){let{node:se,offset:Ce}=ue;n.$isLineBreakNode(se)?se.selectNext(0,0):N.setTextNodeRange(se,Ce,se,Ce)}else he.getParentOrThrow().selectStart();else K(he).select();return w.preventDefault(),w.stopPropagation(),!0}return Yn.$createCodeHighlightNode=P,Yn.$createCodeNode=a,Yn.$isCodeHighlightNode=M,Yn.$isCodeNode=l,Yn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=v,Yn.CODE_LANGUAGE_MAP=T,Yn.CodeHighlightNode=R,Yn.CodeNode=i,Yn.DEFAULT_CODE_LANGUAGE="javascript",Yn.PrismTokenizer=oe,Yn.getCodeLanguages=()=>Object.keys(e.languages).filter(F=>typeof e.languages[F]!="function").sort(),Yn.getDefaultCodeLanguage=()=>"javascript",Yn.getEndOfCodeInLine=K,Yn.getFirstCodeNodeOfLine=Y,Yn.getLanguageFriendlyName=function(F){return F=O(F),v[F]||F},Yn.getLastCodeNodeOfLine=X,Yn.getStartOfCodeInLine=Z,Yn.normalizeCodeLang=O,Yn.registerCodeHighlighting=function(F,w){if(!F.hasNodes([i,R]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return w==null&&(w=oe),t.mergeRegister(F.registerMutationListener(i,N=>{F.update(()=>{for(let[ue,he]of N)if(he!=="destroyed"){var I=n.$getNodeByKey(ue);if(I!==null)e:{var q=I;if(I=F.getElementByKey(q.getKey()),I===null)break e;q=q.getChildren();let se=q.length;if(se===I.__cachedChildrenLength)break e;I.__cachedChildrenLength=se;let Ce="1",Oe=1;for(let Be=0;Be<se;Be++)n.$isLineBreakNode(q[Be])&&(Ce+=`
293
- `+ ++Oe);I.setAttribute("data-gutter",Ce)}}})}),F.registerNodeTransform(i,N=>pe(N,F,w)),F.registerNodeTransform(n.TextNode,N=>Q(N,F,w)),F.registerNodeTransform(R,N=>Q(N,F,w)),F.registerCommand(n.KEY_TAB_COMMAND,N=>{let I=re(N.shiftKey);return I===null?!1:(N.preventDefault(),F.dispatchCommand(I,void 0),!0)},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INSERT_TAB_COMMAND,()=>{let N=n.$getSelection();return j(N)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INDENT_CONTENT_COMMAND,()=>B(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>B(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_UP_COMMAND,N=>W(n.KEY_ARROW_UP_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_DOWN_COMMAND,N=>W(n.KEY_ARROW_DOWN_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_END,N=>J(n.MOVE_TO_END,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_START,N=>J(n.MOVE_TO_START,N),n.COMMAND_PRIORITY_LOW))},Yn}process.env.NODE_ENV==="development"?q7():Z7();dr();yn();var ly=Xt();function J7({src:e,altText:t,width:n,height:r,maxWidth:o}){const i=H.useMemo(()=>({height:r,width:n,maxWidth:o}),[r,n,o]);return an.jsx("img",{src:e,alt:t,style:i})}function X7({altText:e,height:t,maxWidth:n=500,src:r,width:o,key:i}){return ly.$applyNodeReplacement(new cy(r,e,n,o,t,i))}class cy extends ly.DecoratorNode{constructor(t,n,r,o,i,a){super(a),lo(this,"__src"),lo(this,"__altText"),lo(this,"__width"),lo(this,"__height"),lo(this,"__maxWidth"),this.__src=t,this.__altText=n,this.__maxWidth=r,this.__width=o||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(t){return new cy(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return X7(t)}createDOM(t){const n=document.createElement("span"),r=t.theme.image;return r&&(n.className=r),n}updateDOM(){return!1}decorate(){return an.jsx(J7,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}ly.createCommand("INSERT_IMAGE_COMMAND");iy();sy();ay();oy();var yu={},lx;function Q7(){if(lx)return yu;lx=1;var e=yn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(a){return new n(a.__text,a.__key)}constructor(a,l){super(a,l)}createDOM(a){const l=super.createDOM(a);return e.addClassNamesToElement(l,a.theme.hashtag),l}static importJSON(a){const l=r(a.text);return l.setFormat(a.format),l.setDetail(a.detail),l.setMode(a.mode),l.setStyle(a.style),l}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(i=""){return t.$applyNodeReplacement(new n(i))}function o(i){return i instanceof n}return yu.$createHashtagNode=r,yu.$isHashtagNode=o,yu.HashtagNode=n,yu}var vu={},cx;function eY(){if(cx)return vu;cx=1;var e=yn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(i){return new n(i.__text,i.__key)}constructor(i,a){super(i,a)}createDOM(i){let a=super.createDOM(i);return e.addClassNamesToElement(a,i.theme.hashtag),a}static importJSON(i){let a=r(i.text);return a.setFormat(i.format),a.setDetail(i.detail),a.setMode(i.mode),a.setStyle(i.style),a}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(o=""){return t.$applyNodeReplacement(new n(o))}return vu.$createHashtagNode=r,vu.$isHashtagNode=function(o){return o instanceof n},vu.HashtagNode=n,vu}process.env.NODE_ENV==="development"?Q7():eY();var bl={},Rp={},ux;function tY(){if(ux)return Rp;ux=1;var e=dr(),t=Xt(),n=H;function r(i,a){return i.getEditorState().read(()=>{const l=t.$getNodeByKey(a);return l===null?!1:l.isSelected()})}function o(i){const[a]=e.useLexicalComposerContext(),[l,u]=n.useState(()=>r(a,i));n.useEffect(()=>{let b=!0;const C=a.registerUpdateListener(()=>{b&&u(r(a,i))});return()=>{b=!1,C()}},[a,i]);const p=n.useCallback(b=>{a.update(()=>{let C=t.$getSelection();t.$isNodeSelection(C)||(C=t.$createNodeSelection(),t.$setSelection(C)),t.$isNodeSelection(C)&&(b?C.add(i):C.delete(i))})},[a,i]),m=n.useCallback(()=>{a.update(()=>{const b=t.$getSelection();t.$isNodeSelection(b)&&b.clear()})},[a]);return[l,p,m]}return Rp.useLexicalNodeSelection=o,Rp}var $p={},dx;function nY(){if(dx)return $p;dx=1;var e=dr(),t=Xt(),n=H;function r(o,i){return o.getEditorState().read(()=>{let a=t.$getNodeByKey(i);return a===null?!1:a.isSelected()})}return $p.useLexicalNodeSelection=function(o){let[i]=e.useLexicalComposerContext(),[a,l]=n.useState(()=>r(i,o));n.useEffect(()=>{let m=!0,b=i.registerUpdateListener(()=>{m&&l(r(i,o))});return()=>{m=!1,b()}},[i,o]);let u=n.useCallback(m=>{i.update(()=>{let b=t.$getSelection();t.$isNodeSelection(b)||(b=t.$createNodeSelection(),t.$setSelection(b)),t.$isNodeSelection(b)&&(m?b.add(o):b.delete(o))})},[i,o]),p=n.useCallback(()=>{i.update(()=>{const m=t.$getSelection();t.$isNodeSelection(m)&&m.clear()})},[i]);return[a,u,p]},$p}var fx,hx;function qN(){return hx||(hx=1,fx=process.env.NODE_ENV==="development"?tY():nY()),fx}var px;function rY(){if(px)return bl;px=1;var e=dr(),t=qN(),n=yn(),r=Xt(),o=H;const i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:b}){const[C]=e.useLexicalComposerContext(),[_,y,v]=t.useLexicalNodeSelection(b),T=o.useCallback(O=>{if(_&&r.$isNodeSelection(r.$getSelection())){O.preventDefault();const R=r.$getNodeByKey(b);m(R)&&R.remove()}return!1},[_,b]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{const R=C.getElementByKey(b);return O.target===R?(O.shiftKey||v(),y(!_),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,_,b,T,y]),o.useEffect(()=>{const O=C.getElementByKey(b);O!==null&&(O.className=_?"selected":"")},[C,_,b]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(C){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
294
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(b){return b instanceof l}return bl.$createHorizontalRuleNode=p,bl.$isHorizontalRuleNode=m,bl.HorizontalRuleNode=l,bl.INSERT_HORIZONTAL_RULE_COMMAND=i,bl}var _l={},gx;function oY(){if(gx)return _l;gx=1;var e=dr(),t=qN(),n=yn(),r=Xt(),o=H;let i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:b}){let[C]=e.useLexicalComposerContext(),[_,y,v]=t.useLexicalNodeSelection(b),T=o.useCallback(O=>(_&&r.$isNodeSelection(r.$getSelection())&&(O.preventDefault(),O=r.$getNodeByKey(b),m(O)&&O.remove()),!1),[_,b]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{let R=C.getElementByKey(b);return O.target===R?(O.shiftKey||v(),y(!_),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,_,b,T,y]),o.useEffect(()=>{let O=C.getElementByKey(b);O!==null&&(O.className=_?"selected":"")},[C,_,b]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
295
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(b){return b instanceof l}return _l.$createHorizontalRuleNode=p,_l.$isHorizontalRuleNode=m,_l.HorizontalRuleNode=l,_l.INSERT_HORIZONTAL_RULE_COMMAND=i,_l}process.env.NODE_ENV==="development"?rY():oY();var mx=Object.prototype.hasOwnProperty;function yx(e,t,n){for(n of e.keys())if(Ou(n,t))return n}function Ou(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ou(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=yx(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=yx(t,o),!o)||!Ou(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(mx.call(e,n)&&++r&&!mx.call(t,n)||!(n in t)||!Ou(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let bg,ZN,JN,XN,QN=!0;typeof process<"u"&&({FORCE_COLOR:bg,NODE_DISABLE_COLORS:ZN,NO_COLOR:JN,TERM:XN}=process.env||{},QN=process.stdout&&process.stdout.isTTY);const Qt={enabled:!ZN&&JN==null&&XN!=="dumb"&&(bg!=null&&bg!=="0"||QN),reset:xn(0,0),bold:xn(1,22),dim:xn(2,22),italic:xn(3,23),underline:xn(4,24),inverse:xn(7,27),hidden:xn(8,28),strikethrough:xn(9,29),black:xn(30,39),red:xn(31,39),green:xn(32,39),yellow:xn(33,39),blue:xn(34,39),magenta:xn(35,39),cyan:xn(36,39),white:xn(37,39),gray:xn(90,39),grey:xn(90,39),bgBlack:xn(40,49),bgRed:xn(41,49),bgGreen:xn(42,49),bgYellow:xn(43,49),bgBlue:xn(44,49),bgMagenta:xn(45,49),bgCyan:xn(46,49),bgWhite:xn(47,49)};function vx(e,t){let n=0,r,o="",i="";for(;n<e.length;n++)r=e[n],o+=r.open,i+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return o+t+i}function iY(e,t){let n={has:e,keys:t};return n.reset=Qt.reset.bind(n),n.bold=Qt.bold.bind(n),n.dim=Qt.dim.bind(n),n.italic=Qt.italic.bind(n),n.underline=Qt.underline.bind(n),n.inverse=Qt.inverse.bind(n),n.hidden=Qt.hidden.bind(n),n.strikethrough=Qt.strikethrough.bind(n),n.black=Qt.black.bind(n),n.red=Qt.red.bind(n),n.green=Qt.green.bind(n),n.yellow=Qt.yellow.bind(n),n.blue=Qt.blue.bind(n),n.magenta=Qt.magenta.bind(n),n.cyan=Qt.cyan.bind(n),n.white=Qt.white.bind(n),n.gray=Qt.gray.bind(n),n.grey=Qt.grey.bind(n),n.bgBlack=Qt.bgBlack.bind(n),n.bgRed=Qt.bgRed.bind(n),n.bgGreen=Qt.bgGreen.bind(n),n.bgYellow=Qt.bgYellow.bind(n),n.bgBlue=Qt.bgBlue.bind(n),n.bgMagenta=Qt.bgMagenta.bind(n),n.bgCyan=Qt.bgCyan.bind(n),n.bgWhite=Qt.bgWhite.bind(n),n}function xn(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Qt.enabled?vx(this.keys,r+""):r+""):r===void 0?iY([e],[n]):Qt.enabled?vx([n],r+""):r+""}}function Ha(){}Ha.prototype={diff:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function a(k){return o?(setTimeout(function(){o(void 0,k)},0),!0):k}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,u=e.length,p=1,m=l+u;r.maxEditLength&&(m=Math.min(m,r.maxEditLength));var b=(n=r.timeout)!==null&&n!==void 0?n:1/0,C=Date.now()+b,_=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(_[0],t,e,0);if(_[0].oldPos+1>=u&&y+1>=l)return a([{value:this.join(t),count:t.length}]);var v=-1/0,T=1/0;function O(){for(var k=Math.max(v,-p);k<=Math.min(T,p);k+=2){var P=void 0,M=_[k-1],Y=_[k+1];M&&(_[k-1]=void 0);var X=!1;if(Y){var oe=Y.oldPos-k;X=Y&&0<=oe&&oe<l}var Z=M&&M.oldPos+1<u;if(!X&&!Z){_[k]=void 0;continue}if(!Z||X&&M.oldPos+1<Y.oldPos?P=i.addToPath(Y,!0,void 0,0):P=i.addToPath(M,void 0,!0,1),y=i.extractCommon(P,t,e,k),P.oldPos+1>=u&&y+1>=l)return a(aY(i,P.lastComponent,t,e,i.useLongestToken));_[k]=P,P.oldPos+1>=u&&(T=Math.min(T,k-1)),y+1>=l&&(v=Math.max(v,k+1))}p++}if(o)(function k(){setTimeout(function(){if(p>m||Date.now()>C)return o();O()||k()},0)})();else for(;p<=m&&Date.now()<=C;){var R=O();if(R)return R}},addToPath:function(e,t,n,r){var o=e.lastComponent;return o&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.oldPos,l=a-r,u=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function aY(e,t,n,r,o){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var l=0,u=i.length,p=0,m=0;l<u;l++){var b=i[l];if(b.removed){if(b.value=e.join(r.slice(m,m+b.count)),m+=b.count,l&&i[l-1].added){var C=i[l-1];i[l-1]=i[l],i[l]=C}}else{if(!b.added&&o){var _=n.slice(p,p+b.count);_=_.map(function(v,T){var O=r[m+T];return O.length>v.length?O:v}),b.value=e.join(_)}else b.value=e.join(n.slice(p,p+b.count));p+=b.count,b.added||(m+=b.count)}}var y=i[u-1];return u>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(i[u-2].value+=y.value,i.pop()),i}var bx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,_x=/\S/,eS=new Ha;eS.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!_x.test(e)&&!_x.test(t)};eS.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&bx.test(t[n])&&bx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var tS=new Ha;tS.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
296
- `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var sY=new Ha;sY.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var lY=new Ha;lY.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function af(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?af=function(t){return typeof t}:af=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}var cY=Object.prototype.toString,Iu=new Ha;Iu.useLongestToken=!0;Iu.tokenize=tS.tokenize;Iu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(_g(e,null,null,o),o," ")};Iu.equals=function(e,t){return Ha.prototype.equals.call(Iu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function _g(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var a;if(cY.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),i=0;i<e.length;i+=1)a[i]=_g(e[i],t,n,r,o);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),af(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],u;for(u in e)e.hasOwnProperty(u)&&l.push(u);for(l.sort(),i=0;i<l.length;i+=1)u=l[i],a[u]=_g(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}var xg=new Ha;xg.tokenize=function(e){return e.slice()};xg.join=xg.removeEmpty=function(e){return e};Qt.red,Qt.grey,Qt.green;Qt.dim().italic;Qt.dim("→");Qt.dim("·");Qt.dim("↵");function Of(e){e=e.replace(/\r?\n/g,`
297
- `);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,o=(t||[]).length;for(;n<o;n++)r=Math.min(r,t[n].length);return o&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class uY extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Ko(e,t,n,r,o,i,a){if(e)return;let l=a||i;if(a instanceof Error)throw a;let u=o;throw new uY({actual:t,expects:n,operator:r,message:l,details:u,generated:!a})}function Qi(e,t){Ko(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Qi.ok=Qi;Qi.equal=function(e,t,n){Ko(!Ou(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};Qi.type=function(e,t,n){let r=typeof e;Ko(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};Qi.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Ko(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};Qi.snapshot=function(e,t,n){e=Of(e),t=Of(t),Ko(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};Qi.fixture=function(e,t,n){e=Of(e),t=Of(t),Ko(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};Qi.match=function(e,t,n){typeof t=="string"?Ko(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Ko(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};Qi.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Ko(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Ko(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Ko(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};class Is extends Error{}class dY extends Is{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class fY extends Is{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class hY extends Is{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Bl extends Is{}class nS extends Is{constructor(t){super(`Invalid unit ${t}`)}}class Kr extends Is{}class Aa extends Is{constructor(){super("Zone is an abstract class")}}const gt="numeric",qo="short",fo="long",Af={year:gt,month:gt,day:gt},rS={year:gt,month:qo,day:gt},pY={year:gt,month:qo,day:gt,weekday:qo},oS={year:gt,month:fo,day:gt},iS={year:gt,month:fo,day:gt,weekday:fo},aS={hour:gt,minute:gt},sS={hour:gt,minute:gt,second:gt},lS={hour:gt,minute:gt,second:gt,timeZoneName:qo},cS={hour:gt,minute:gt,second:gt,timeZoneName:fo},uS={hour:gt,minute:gt,hourCycle:"h23"},dS={hour:gt,minute:gt,second:gt,hourCycle:"h23"},fS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:qo},hS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:fo},pS={year:gt,month:gt,day:gt,hour:gt,minute:gt},gS={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},mS={year:gt,month:qo,day:gt,hour:gt,minute:gt},yS={year:gt,month:qo,day:gt,hour:gt,minute:gt,second:gt},gY={year:gt,month:qo,day:gt,weekday:qo,hour:gt,minute:gt},vS={year:gt,month:fo,day:gt,hour:gt,minute:gt,timeZoneName:qo},bS={year:gt,month:fo,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:qo},_S={year:gt,month:fo,day:gt,weekday:fo,hour:gt,minute:gt,timeZoneName:fo},xS={year:gt,month:fo,day:gt,weekday:fo,hour:gt,minute:gt,second:gt,timeZoneName:fo};class Ju{get type(){throw new Aa}get name(){throw new Aa}get ianaName(){return this.name}get isUniversal(){throw new Aa}offsetName(t,n){throw new Aa}formatOffset(t,n){throw new Aa}offset(t){throw new Aa}equals(t){throw new Aa}get isValid(){throw new Aa}}let Dp=null;class lh extends Ju{static get instance(){return Dp===null&&(Dp=new lh),Dp}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return RS(t,n,r)}formatOffset(t,n){return Au(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let sf={};function mY(e){return sf[e]||(sf[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),sf[e]}const yY={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function vY(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,l,u,p,m]=r;return[a,o,i,l,u,p,m]}function bY(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],l=yY[i];i==="era"?r[l]=a:Gt(l)||(r[l]=parseInt(a,10))}return r}let Yd={};class ea extends Ju{static create(t){return Yd[t]||(Yd[t]=new ea(t)),Yd[t]}static resetCache(){Yd={},sf={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=ea.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return RS(t,n,r,this.name)}formatOffset(t,n){return Au(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=mY(this.name);let[o,i,a,l,u,p,m]=r.formatToParts?bY(r,n):vY(r,n);l==="BC"&&(o=-Math.abs(o)+1);const b=uh({year:o,month:i,day:a,hour:u===24?0:u,minute:p,second:m,millisecond:0});let C=+n;const _=C%1e3;return C-=_>=0?_:1e3+_,(b-C)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let xx={};function _Y(e,t={}){const n=JSON.stringify([e,t]);let r=xx[n];return r||(r=new Intl.ListFormat(e,t),xx[n]=r),r}let Eg={};function Cg(e,t={}){const n=JSON.stringify([e,t]);let r=Eg[n];return r||(r=new Intl.DateTimeFormat(e,t),Eg[n]=r),r}let wg={};function xY(e,t={}){const n=JSON.stringify([e,t]);let r=wg[n];return r||(r=new Intl.NumberFormat(e,t),wg[n]=r),r}let Tg={};function EY(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=Tg[o];return i||(i=new Intl.RelativeTimeFormat(e,t),Tg[o]=i),i}let lf=null;function CY(){return lf||(lf=new Intl.DateTimeFormat().resolvedOptions().locale,lf)}let Ex={};function wY(e){let t=Ex[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Ex[e]=t}return t}function TY(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Cg(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Cg(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function NY(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function SY(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function OY(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function qd(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function AY(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class RY{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=xY(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):hy(t,3);return Qn(n,this.padTo)}}}class $Y{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&ea.create(l).valid?(o=l,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Cg(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class DY{constructor(t,n,r){this.opts={style:"long",...r},!n&&OS()&&(this.rtf=EY(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):XY(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const kY={firstDay:1,minimalDays:4,weekend:[6,7]};class gn{static fromOpts(t){return gn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||qn.defaultLocale,l=a||(i?"en-US":CY()),u=n||qn.defaultNumberingSystem,p=r||qn.defaultOutputCalendar,m=Ng(o)||qn.defaultWeekSettings;return new gn(l,u,p,m,a)}static resetCache(){lf=null,Eg={},wg={},Tg={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return gn.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,l,u]=TY(t);this.locale=a,this.numberingSystem=n||l||null,this.outputCalendar=r||u||null,this.weekSettings=o,this.intl=NY(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=AY(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:gn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ng(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return qd(this,t,kS,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=SY(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return qd(this,t,IS,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=OY(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return qd(this,void 0,()=>LS,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return qd(this,t,FS,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(l=>l.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new RY(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new $Y(t,this.intl,n)}relFormatter(t={}){return new DY(this.intl,this.isEnglish(),t)}listFormatter(t={}){return _Y(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:AS()?wY(this.locale):kY}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let kp=null;class Br extends Ju{static get utcInstance(){return kp===null&&(kp=new Br(0)),kp}static instance(t){return t===0?Br.utcInstance:new Br(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Br(dh(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Au(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Au(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Au(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class MY extends Ju{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ma(e,t){if(Gt(e)||e===null)return t;if(e instanceof Ju)return e;if(LY(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?lh.instance:n==="utc"||n==="gmt"?Br.utcInstance:Br.parseSpecifier(n)||ea.create(e)}else return _s(e)?Br.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new MY(e)}let Cx=()=>Date.now(),wx="system",Tx=null,Nx=null,Sx=null,Ox=60,Ax,Rx=null;class qn{static get now(){return Cx}static set now(t){Cx=t}static set defaultZone(t){wx=t}static get defaultZone(){return Ma(wx,lh.instance)}static get defaultLocale(){return Tx}static set defaultLocale(t){Tx=t}static get defaultNumberingSystem(){return Nx}static set defaultNumberingSystem(t){Nx=t}static get defaultOutputCalendar(){return Sx}static set defaultOutputCalendar(t){Sx=t}static get defaultWeekSettings(){return Rx}static set defaultWeekSettings(t){Rx=Ng(t)}static get twoDigitCutoffYear(){return Ox}static set twoDigitCutoffYear(t){Ox=t%100}static get throwOnInvalid(){return Ax}static set throwOnInvalid(t){Ax=t}static resetCaches(){gn.resetCache(),ea.resetCache()}}class Vo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ES=[0,31,59,90,120,151,181,212,243,273,304,334],CS=[0,31,60,91,121,152,182,213,244,274,305,335];function Co(e,t){return new Vo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function uy(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function wS(e,t,n){return n+(Xu(e)?CS:ES)[t-1]}function TS(e,t){const n=Xu(e)?CS:ES,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function dy(e,t){return(e-t+7)%7+1}function Rf(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=wS(r,o,i),l=dy(uy(r,o,i),n);let u=Math.floor((a-l+14-t)/7),p;return u<1?(p=r-1,u=Lu(p,t,n)):u>Lu(r,t,n)?(p=r+1,u=1):p=r,{weekYear:p,weekNumber:u,weekday:l,...fh(e)}}function $x(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=dy(uy(r,1,t),n),l=Ul(r);let u=o*7+i-a-7+t,p;u<1?(p=r-1,u+=Ul(p)):u>l?(p=r+1,u-=Ul(r)):p=r;const{month:m,day:b}=TS(p,u);return{year:p,month:m,day:b,...fh(e)}}function Mp(e){const{year:t,month:n,day:r}=e,o=wS(t,n,r);return{year:t,ordinal:o,...fh(e)}}function Dx(e){const{year:t,ordinal:n}=e,{month:r,day:o}=TS(t,n);return{year:t,month:r,day:o,...fh(e)}}function kx(e,t){if(!Gt(e.localWeekday)||!Gt(e.localWeekNumber)||!Gt(e.localWeekYear)){if(!Gt(e.weekday)||!Gt(e.weekNumber)||!Gt(e.weekYear))throw new Bl("Cannot mix locale-based week fields with ISO-based week fields");return Gt(e.localWeekday)||(e.weekday=e.localWeekday),Gt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Gt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function PY(e,t=4,n=1){const r=ch(e.weekYear),o=wo(e.weekNumber,1,Lu(e.weekYear,t,n)),i=wo(e.weekday,1,7);return r?o?i?!1:Co("weekday",e.weekday):Co("week",e.weekNumber):Co("weekYear",e.weekYear)}function IY(e){const t=ch(e.year),n=wo(e.ordinal,1,Ul(e.year));return t?n?!1:Co("ordinal",e.ordinal):Co("year",e.year)}function NS(e){const t=ch(e.year),n=wo(e.month,1,12),r=wo(e.day,1,$f(e.year,e.month));return t?n?r?!1:Co("day",e.day):Co("month",e.month):Co("year",e.year)}function SS(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=wo(t,0,23)||t===24&&n===0&&r===0&&o===0,a=wo(n,0,59),l=wo(r,0,59),u=wo(o,0,999);return i?a?l?u?!1:Co("millisecond",o):Co("second",r):Co("minute",n):Co("hour",t)}function Gt(e){return typeof e>"u"}function _s(e){return typeof e=="number"}function ch(e){return typeof e=="number"&&e%1===0}function LY(e){return typeof e=="string"}function FY(e){return Object.prototype.toString.call(e)==="[object Date]"}function OS(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function AS(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jY(e){return Array.isArray(e)?e:[e]}function Mx(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function BY(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Xl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ng(e){if(e==null)return null;if(typeof e!="object")throw new Kr("Week settings must be an object");if(!wo(e.firstDay,1,7)||!wo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!wo(t,1,7)))throw new Kr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function wo(e,t,n){return ch(e)&&e>=t&&e<=n}function WY(e,t){return e-t*Math.floor(e/t)}function Qn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function ka(e){if(!(Gt(e)||e===null||e===""))return parseInt(e,10)}function ps(e){if(!(Gt(e)||e===null||e===""))return parseFloat(e)}function fy(e){if(!(Gt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function hy(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Xu(e){return e%4===0&&(e%100!==0||e%400===0)}function Ul(e){return Xu(e)?366:365}function $f(e,t){const n=WY(t-1,12)+1,r=e+(t-n)/12;return n===2?Xu(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function uh(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Px(e,t,n){return-dy(uy(e,1,t),n)+t-1}function Lu(e,t=4,n=1){const r=Px(e,t,n),o=Px(e+1,t,n);return(Ul(e)-r+o)/7}function Sg(e){return e>99?e:e>qn.twoDigitCutoffYear?1900+e:2e3+e}function RS(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},l=new Intl.DateTimeFormat(n,a).formatToParts(o).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function dh(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function $S(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Kr(`Invalid unit value ${e}`);return t}function Df(e,t){const n={};for(const r in e)if(Xl(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=$S(o)}return n}function Au(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Qn(n,2)}:${Qn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Qn(n,2)}${Qn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function fh(e){return BY(e,["hour","minute","second","millisecond"])}const zY=["January","February","March","April","May","June","July","August","September","October","November","December"],DS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],HY=["J","F","M","A","M","J","J","A","S","O","N","D"];function kS(e){switch(e){case"narrow":return[...HY];case"short":return[...DS];case"long":return[...zY];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const MS=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],PS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],GY=["M","T","W","T","F","S","S"];function IS(e){switch(e){case"narrow":return[...GY];case"short":return[...PS];case"long":return[...MS];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const LS=["AM","PM"],VY=["Before Christ","Anno Domini"],KY=["BC","AD"],UY=["B","A"];function FS(e){switch(e){case"narrow":return[...UY];case"short":return[...KY];case"long":return[...VY];default:return null}}function YY(e){return LS[e.hour<12?0:1]}function qY(e,t){return IS(t)[e.weekday-1]}function ZY(e,t){return kS(t)[e.month-1]}function JY(e,t){return FS(t)[e.year<0?0:1]}function XY(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const b=e==="days";switch(t){case 1:return b?"tomorrow":`next ${o[e][0]}`;case-1:return b?"yesterday":`last ${o[e][0]}`;case 0:return b?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,l=Math.abs(t),u=l===1,p=o[e],m=r?u?p[1]:p[2]||p[1]:u?o[e][0]:e;return a?`${l} ${m} ago`:`in ${l} ${m}`}function Ix(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const QY={D:Af,DD:rS,DDD:oS,DDDD:iS,t:aS,tt:sS,ttt:lS,tttt:cS,T:uS,TT:dS,TTT:fS,TTTT:hS,f:pS,ff:mS,fff:vS,ffff:_S,F:gS,FF:yS,FFF:bS,FFFF:xS};class Mr{static create(t,n={}){return new Mr(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const l=t.charAt(a);l==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||l===n?r+=l:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return QY[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Qn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(_,y)=>this.loc.extract(t,_,y),a=_=>t.isOffsetFixed&&t.offset===0&&_.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,_.format):"",l=()=>r?YY(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(_,y)=>r?ZY(t,_):i(y?{month:_}:{month:_,day:"numeric"},"month"),p=(_,y)=>r?qY(t,_):i(y?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),m=_=>{const y=Mr.macroTokenToFormatOpts(_);return y?this.formatWithSystemDefault(t,y):_},b=_=>r?JY(t,_):i({era:_},"era"),C=_=>{switch(_){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return b("short");case"GG":return b("long");case"GGGGG":return b("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return m(_)}};return Ix(Mr.parseFormat(n),C)}formatDurationFromString(t,n){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=u=>p=>{const m=r(p);return m?this.num(u.get(m),p.length):p},i=Mr.parseFormat(n),a=i.reduce((u,{literal:p,val:m})=>p?u:u.concat(m),[]),l=t.shiftTo(...a.map(r).filter(u=>u));return Ix(i,o(l))}}const jS=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function bc(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function _c(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,l,u]=i(t,o);return[{...n,...a},l||r,u]},[{},null,1]).slice(0,2)}function xc(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function BS(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=ka(t[n+o]);return[r,null,n+o]}}const WS=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,eq=`(?:${WS.source}?(?:\\[(${jS.source})\\])?)?`,py=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,zS=RegExp(`${py.source}${eq}`),gy=RegExp(`(?:T${zS.source})?`),tq=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,nq=/(\d{4})-?W(\d\d)(?:-?(\d))?/,rq=/(\d{4})-?(\d{3})/,oq=BS("weekYear","weekNumber","weekDay"),iq=BS("year","ordinal"),aq=/(\d{4})-(\d\d)-(\d\d)/,HS=RegExp(`${py.source} ?(?:${WS.source}|(${jS.source}))?`),sq=RegExp(`(?: ${HS.source})?`);function Yl(e,t,n){const r=e[t];return Gt(r)?n:ka(r)}function lq(e,t){return[{year:Yl(e,t),month:Yl(e,t+1,1),day:Yl(e,t+2,1)},null,t+3]}function Ec(e,t){return[{hours:Yl(e,t,0),minutes:Yl(e,t+1,0),seconds:Yl(e,t+2,0),milliseconds:fy(e[t+3])},null,t+4]}function Qu(e,t){const n=!e[t]&&!e[t+1],r=dh(e[t+1],e[t+2]),o=n?null:Br.instance(r);return[{},o,t+3]}function ed(e,t){const n=e[t]?ea.create(e[t]):null;return[{},n,t+1]}const cq=RegExp(`^T?${py.source}$`),uq=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function dq(e){const[t,n,r,o,i,a,l,u,p]=e,m=t[0]==="-",b=u&&u[0]==="-",C=(_,y=!1)=>_!==void 0&&(y||_&&m)?-_:_;return[{years:C(ps(n)),months:C(ps(r)),weeks:C(ps(o)),days:C(ps(i)),hours:C(ps(a)),minutes:C(ps(l)),seconds:C(ps(u),u==="-0"),milliseconds:C(fy(p),b)}]}const fq={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function my(e,t,n,r,o,i,a){const l={year:t.length===2?Sg(ka(t)):ka(t),month:DS.indexOf(n)+1,day:ka(r),hour:ka(o),minute:ka(i)};return a&&(l.second=ka(a)),e&&(l.weekday=e.length>3?MS.indexOf(e)+1:PS.indexOf(e)+1),l}const hq=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function pq(e){const[,t,n,r,o,i,a,l,u,p,m,b]=e,C=my(t,o,r,n,i,a,l);let _;return u?_=fq[u]:p?_=0:_=dh(m,b),[C,new Br(_)]}function gq(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const mq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,yq=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,vq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lx(e){const[,t,n,r,o,i,a,l]=e;return[my(t,o,r,n,i,a,l),Br.utcInstance]}function bq(e){const[,t,n,r,o,i,a,l]=e;return[my(t,l,n,r,o,i,a),Br.utcInstance]}const _q=bc(tq,gy),xq=bc(nq,gy),Eq=bc(rq,gy),Cq=bc(zS),GS=_c(lq,Ec,Qu,ed),wq=_c(oq,Ec,Qu,ed),Tq=_c(iq,Ec,Qu,ed),Nq=_c(Ec,Qu,ed);function Sq(e){return xc(e,[_q,GS],[xq,wq],[Eq,Tq],[Cq,Nq])}function Oq(e){return xc(gq(e),[hq,pq])}function Aq(e){return xc(e,[mq,Lx],[yq,Lx],[vq,bq])}function Rq(e){return xc(e,[uq,dq])}const $q=_c(Ec);function Dq(e){return xc(e,[cq,$q])}const kq=bc(aq,sq),Mq=bc(HS),Pq=_c(Ec,Qu,ed);function Iq(e){return xc(e,[kq,GS],[Mq,Pq])}const Fx="Invalid Duration",VS={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Lq={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...VS},xo=146097/400,xl=146097/4800,Fq={years:{quarters:4,months:12,weeks:xo/7,days:xo,hours:xo*24,minutes:xo*24*60,seconds:xo*24*60*60,milliseconds:xo*24*60*60*1e3},quarters:{months:3,weeks:xo/28,days:xo/4,hours:xo*24/4,minutes:xo*24*60/4,seconds:xo*24*60*60/4,milliseconds:xo*24*60*60*1e3/4},months:{weeks:xl/7,days:xl,hours:xl*24,minutes:xl*24*60,seconds:xl*24*60*60,milliseconds:xl*24*60*60*1e3},...VS},bs=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jq=bs.slice(0).reverse();function Ra(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new rn(r)}function KS(e,t){let n=t.milliseconds??0;for(const r of jq.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function jx(e,t){const n=KS(e,t)<0?-1:1;bs.reduceRight((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],l=Math.floor(i/a);t[o]+=l*n,t[r]-=l*a*n}return o},null),bs.reduce((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function Bq(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class rn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Fq:Lq;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||gn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return rn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Kr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:Df(t,rn.normalizeUnit),loc:gn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(_s(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Kr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Rq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Dq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the Duration is invalid");const r=t instanceof Vo?t:new Vo(t,n);if(qn.throwOnInvalid)throw new hY(r);return new rn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new nS(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Mr.create(this.loc,r).formatDurationFromString(this,t):Fx}toHuman(t={}){if(!this.isValid)return Fx;const n=bs.map(r=>{const o=this.values[r];return Gt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=hy(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?KS(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t),r={};for(const o of bs)(Xl(n.values,o)||Xl(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Ra(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=$S(t(this.values[r],r));return Ra(this,{values:n},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Df(t,rn.normalizeUnit)};return Ra(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Ra(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return jx(this.matrix,t),Ra(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Bq(this.normalize().shiftToAll().toObject());return Ra(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>rn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of bs)if(t.indexOf(a)>=0){i=a;let l=0;for(const p in r)l+=this.matrix[p][a]*r[p],r[p]=0;_s(o[a])&&(l+=o[a]);const u=Math.trunc(l);n[a]=u,r[a]=(l*1e3-u*1e3)/1e3}else _s(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return jx(this.matrix,n),Ra(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Ra(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of bs)if(!n(this.values[r],t.values[r]))return!1;return!0}}const El="Invalid Interval";function Wq(e,t){return!e||!e.isValid?Gn.invalid("missing or invalid start"):!t||!t.isValid?Gn.invalid("missing or invalid end"):t<e?Gn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Gn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the Interval is invalid");const r=t instanceof Vo?t:new Vo(t,n);if(qn.throwOnInvalid)throw new fY(r);return new Gn({invalid:r})}static fromDateTimes(t,n){const r=_u(t),o=_u(n);return Wq(r,o)??new Gn({start:r,end:o})}static after(t,n){const r=rn.fromDurationLike(n),o=_u(t);return Gn.fromDateTimes(o,o.plus(r))}static before(t,n){const r=rn.fromDurationLike(n),o=_u(t);return Gn.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=It.fromISO(r,n),a=i.isValid}catch{a=!1}let l,u;try{l=It.fromISO(o,n),u=l.isValid}catch{u=!1}if(a&&u)return Gn.fromDateTimes(i,l);if(a){const p=rn.fromISO(o,n);if(p.isValid)return Gn.after(i,p)}else if(u){const p=rn.fromISO(r,n);if(p.isValid)return Gn.before(l,p)}}return Gn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Gn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(_u).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,l=+a>+this.e?this.e:a;r.push(Gn.fromDateTimes(o,l)),o=l,i+=1}return r}splitBy(t){const n=rn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(u=>u*o));i=+l>+this.e?this.e:l,a.push(Gn.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Gn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Gn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),l=a.sort((u,p)=>u.time-p.time);for(const u of l)r+=u.type==="s"?1:-1,r===1?n=u.time:(n&&+n!=+u.time&&o.push(Gn.fromDateTimes(n,u.time)),n=null);return Gn.merge(o)}difference(...t){return Gn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:El}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Af,n={}){return this.isValid?Mr.create(this.s.loc.clone(n),t).formatInterval(this):El}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:El}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:El}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:El}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:El}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):rn.invalid(this.invalidReason)}mapEndpoints(t){return Gn.fromDateTimes(t(this.s),t(this.e))}}class Zd{static hasDST(t=qn.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return ea.isValidZone(t)}static normalizeZone(t){return Ma(t,qn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||gn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||gn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||gn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||gn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return gn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return gn.create(n,null,"gregory").eras(t)}static features(){return{relative:OS(),localeWeek:AS()}}}function Bx(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(rn.fromMillis(r).as("days"))}function zq(e,t,n){const r=[["years",(u,p)=>p.year-u.year],["quarters",(u,p)=>p.quarter-u.quarter+(p.year-u.year)*4],["months",(u,p)=>p.month-u.month+(p.year-u.year)*12],["weeks",(u,p)=>{const m=Bx(u,p);return(m-m%7)/7}],["days",Bx]],o={},i=e;let a,l;for(const[u,p]of r)n.indexOf(u)>=0&&(a=u,o[u]=p(e,t),l=i.plus(o),l>t?(o[u]--,e=i.plus(o),e>t&&(l=e,o[u]--,e=i.plus(o))):e=l);return[e,o,l,a]}function Hq(e,t,n,r){let[o,i,a,l]=zq(e,t,n);const u=t-o,p=n.filter(b=>["hours","minutes","seconds","milliseconds"].indexOf(b)>=0);p.length===0&&(a<t&&(a=o.plus({[l]:1})),a!==o&&(i[l]=(i[l]||0)+u/(a-o)));const m=rn.fromObject(i,r);return p.length>0?rn.fromMillis(u,r).shiftTo(...p).plus(m):m}const yy={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Wx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Gq=yy.hanidec.replace(/[\[|\]]/g,"").split("");function Vq(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(yy.hanidec)!==-1)t+=Gq.indexOf(e[n]);else for(const o in Wx){const[i,a]=Wx[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function Bo({numberingSystem:e},t=""){return new RegExp(`${yy[e||"latn"]}${t}`)}const Kq="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(Vq(n))}}const Uq=" ",US=`[ ${Uq}]`,YS=new RegExp(US,"g");function Yq(e){return e.replace(/\./g,"\\.?").replace(YS,US)}function zx(e){return e.replace(/\./g,"").replace(YS," ").toLowerCase()}function Wo(e,t){return e===null?null:{regex:RegExp(e.map(Yq).join("|")),deser:([n])=>e.findIndex(r=>zx(n)===zx(r))+t}}function Hx(e,t){return{regex:e,deser:([,n,r])=>dh(n,r),groups:t}}function Jd(e){return{regex:e,deser:([t])=>t}}function qq(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zq(e,t){const n=Bo(t),r=Bo(t,"{2}"),o=Bo(t,"{3}"),i=Bo(t,"{4}"),a=Bo(t,"{6}"),l=Bo(t,"{1,2}"),u=Bo(t,"{1,3}"),p=Bo(t,"{1,6}"),m=Bo(t,"{1,9}"),b=Bo(t,"{2,4}"),C=Bo(t,"{4,6}"),_=v=>({regex:RegExp(qq(v.val)),deser:([T])=>T,literal:!0}),y=(v=>{if(e.literal)return _(v);switch(v.val){case"G":return Wo(t.eras("short"),0);case"GG":return Wo(t.eras("long"),0);case"y":return ln(p);case"yy":return ln(b,Sg);case"yyyy":return ln(i);case"yyyyy":return ln(C);case"yyyyyy":return ln(a);case"M":return ln(l);case"MM":return ln(r);case"MMM":return Wo(t.months("short",!0),1);case"MMMM":return Wo(t.months("long",!0),1);case"L":return ln(l);case"LL":return ln(r);case"LLL":return Wo(t.months("short",!1),1);case"LLLL":return Wo(t.months("long",!1),1);case"d":return ln(l);case"dd":return ln(r);case"o":return ln(u);case"ooo":return ln(o);case"HH":return ln(r);case"H":return ln(l);case"hh":return ln(r);case"h":return ln(l);case"mm":return ln(r);case"m":return ln(l);case"q":return ln(l);case"qq":return ln(r);case"s":return ln(l);case"ss":return ln(r);case"S":return ln(u);case"SSS":return ln(o);case"u":return Jd(m);case"uu":return Jd(l);case"uuu":return ln(n);case"a":return Wo(t.meridiems(),0);case"kkkk":return ln(i);case"kk":return ln(b,Sg);case"W":return ln(l);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return Wo(t.weekdays("short",!1),1);case"EEEE":return Wo(t.weekdays("long",!1),1);case"ccc":return Wo(t.weekdays("short",!0),1);case"cccc":return Wo(t.weekdays("long",!0),1);case"Z":case"ZZ":return Hx(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return Hx(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Jd(/[a-z_+-/]{1,256}?/i);case" ":return Jd(/[^\S\n\r]/);default:return _(v)}})(e)||{invalidReason:Kq};return y.token=e,y}const Jq={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Xq(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const u=/^\s+$/.test(o);return{literal:!u,val:u?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let l=Jq[a];if(typeof l=="object"&&(l=l[i]),l)return{literal:!1,val:l}}function Qq(e){return[`^${e.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,e]}function eZ(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Xl(n,a)){const l=n[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(o[l.token.val[0]]=l.deser(r.slice(i,i+u))),i+=u}return[r,o]}else return[r,{}]}function tZ(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Gt(e.z)||(n=ea.create(e.z)),Gt(e.Z)||(n||(n=new Br(e.Z)),r=e.Z),Gt(e.q)||(e.M=(e.q-1)*3+1),Gt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Gt(e.u)||(e.S=fy(e.u)),[Object.keys(e).reduce((o,i)=>{const a=t(i);return a&&(o[a]=e[i]),o},{}),n,r]}let Pp=null;function nZ(){return Pp||(Pp=It.fromMillis(1555555555555)),Pp}function rZ(e,t){if(e.literal)return e;const n=Mr.macroTokenToFormatOpts(e.val),r=JS(n,t);return r==null||r.includes(void 0)?e:r}function qS(e,t){return Array.prototype.concat(...e.map(n=>rZ(n,t)))}function ZS(e,t,n){const r=qS(Mr.parseFormat(n),e),o=r.map(a=>Zq(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,l]=Qq(o),u=RegExp(a,"i"),[p,m]=eZ(t,u,l),[b,C,_]=m?tZ(m):[null,null,void 0];if(Xl(m,"a")&&Xl(m,"H"))throw new Bl("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:u,rawMatches:p,matches:m,result:b,zone:C,specificOffset:_}}}function oZ(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=ZS(e,t,n);return[r,o,i,a]}function JS(e,t){if(!e)return null;const n=Mr.create(t,e).dtFormatter(nZ()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(i=>Xq(i,e,o))}const Ip="Invalid DateTime",Gx=864e13;function Xd(e){return new Vo("unsupported zone",`the zone "${e.name}" is not supported`)}function Lp(e){return e.weekData===null&&(e.weekData=Rf(e.c)),e.weekData}function Fp(e){return e.localWeekData===null&&(e.localWeekData=Rf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function gs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function XS(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function Qd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function cf(e,t,n){return XS(uh(e),t,n)}function Vx(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,$f(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=uh(i);let[u,p]=XS(l,n,e.zone);return a!==0&&(u+=a,p=e.zone.offset(u)),{ts:u,o:p}}function bu(e,t,n,r,o,i){const{setZone:a,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const u=t||l,p=It.fromObject(e,{...n,zone:u,specificOffset:i});return a?p:p.setZone(l)}else return It.invalid(new Vo("unparsable",`the input "${o}" can't be parsed as ${r}`))}function ef(e,t,n=!0){return e.isValid?Mr.create(gn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function jp(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Qn(e.c.year,n?6:4),t?(r+="-",r+=Qn(e.c.month),r+="-",r+=Qn(e.c.day)):(r+=Qn(e.c.month),r+=Qn(e.c.day)),r}function Kx(e,t,n,r,o,i){let a=Qn(e.c.hour);return t?(a+=":",a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Qn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Qn(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Qn(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Qn(Math.trunc(-e.o/60)),a+=":",a+=Qn(Math.trunc(-e.o%60))):(a+="+",a+=Qn(Math.trunc(e.o/60)),a+=":",a+=Qn(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const QS={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},iZ={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},aZ={ordinal:1,hour:0,minute:0,second:0,millisecond:0},e1=["year","month","day","hour","minute","second","millisecond"],sZ=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lZ=["year","ordinal","hour","minute","second","millisecond"];function cZ(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new nS(e);return t}function Ux(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cZ(e)}}function Yx(e,t){const n=Ma(t.zone,qn.defaultZone),r=gn.fromObject(t),o=qn.now();let i,a;if(Gt(e.year))i=o;else{for(const p of e1)Gt(e[p])&&(e[p]=QS[p]);const l=NS(e)||SS(e);if(l)return It.invalid(l);const u=n.offset(o);[i,a]=cf(e,u,n)}return new It({ts:i,zone:n,loc:r,o:a})}function qx(e,t,n){const r=Gt(n.round)?!0:n.round,o=(a,l)=>(a=hy(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,l)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const l=i(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function Zx(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class It{constructor(t){const n=t.zone||qn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Vo("invalid input"):null)||(n.isValid?null:Xd(n));this.ts=Gt(t.ts)?qn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=Qd(this.ts,a),r=Number.isNaN(o.year)?new Vo("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||gn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=Zx(arguments),[r,o,i,a,l,u,p]=n;return Yx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static utc(){const[t,n]=Zx(arguments),[r,o,i,a,l,u,p]=n;return t.zone=Br.utcInstance,Yx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static fromJSDate(t,n={}){const r=FY(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=Ma(n.zone,qn.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:gn.fromObject(n)}):It.invalid(Xd(o))}static fromMillis(t,n={}){if(_s(t))return t<-Gx||t>Gx?It.invalid("Timestamp out of range"):new It({ts:t,zone:Ma(n.zone,qn.defaultZone),loc:gn.fromObject(n)});throw new Kr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(_s(t))return new It({ts:t*1e3,zone:Ma(n.zone,qn.defaultZone),loc:gn.fromObject(n)});throw new Kr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Ma(n.zone,qn.defaultZone);if(!r.isValid)return It.invalid(Xd(r));const o=gn.fromObject(n),i=Df(t,Ux),{minDaysInFirstWeek:a,startOfWeek:l}=kx(i,o),u=qn.now(),p=Gt(n.specificOffset)?r.offset(u):n.specificOffset,m=!Gt(i.ordinal),b=!Gt(i.year),C=!Gt(i.month)||!Gt(i.day),_=b||C,y=i.weekYear||i.weekNumber;if((_||m)&&y)throw new Bl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&m)throw new Bl("Can't mix ordinal dates with month/day");const v=y||i.weekday&&!_;let T,O,R=Qd(u,p);v?(T=sZ,O=iZ,R=Rf(R,a,l)):m?(T=lZ,O=aZ,R=Mp(R)):(T=e1,O=QS);let k=!1;for(const K of T){const Q=i[K];Gt(Q)?k?i[K]=O[K]:i[K]=R[K]:k=!0}const P=v?PY(i,a,l):m?IY(i):NS(i),M=P||SS(i);if(M)return It.invalid(M);const Y=v?$x(i,a,l):m?Dx(i):i,[X,oe]=cf(Y,p,r),Z=new It({ts:X,zone:r,o:oe,loc:o});return i.weekday&&_&&t.weekday!==Z.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=Sq(t);return bu(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=Oq(t);return bu(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=Aq(t);return bu(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Gt(t)||Gt(n))throw new Kr("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[l,u,p,m]=oZ(a,t,n);return m?It.invalid(m):bu(l,u,r,`format ${n}`,t,p)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Iq(t);return bu(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the DateTime is invalid");const r=t instanceof Vo?t:new Vo(t,n);if(qn.throwOnInvalid)throw new dY(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=JS(t,gn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return qS(Mr.parseFormat(t),gn.fromObject(n)).map(r=>r.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Lp(this).weekYear:NaN}get weekNumber(){return this.isValid?Lp(this).weekNumber:NaN}get weekday(){return this.isValid?Lp(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Fp(this).weekday:NaN}get localWeekNumber(){return this.isValid?Fp(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Fp(this).weekYear:NaN}get ordinal(){return this.isValid?Mp(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=uh(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),l=this.zone.offset(r-i*n);if(a===l)return[this];const u=r-a*n,p=r-l*n,m=Qd(u,a),b=Qd(p,l);return m.hour===b.hour&&m.minute===b.minute&&m.second===b.second&&m.millisecond===b.millisecond?[gs(this,{ts:u}),gs(this,{ts:p})]:[this]}get isInLeapYear(){return Xu(this.year)}get daysInMonth(){return $f(this.year,this.month)}get daysInYear(){return this.isValid?Ul(this.year):NaN}get weeksInWeekYear(){return this.isValid?Lu(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Lu(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Mr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Br.instance(t),n)}toLocal(){return this.setZone(qn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Ma(t,qn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=cf(a,i,t)}return gs(this,{ts:o,zone:t})}else return It.invalid(Xd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return gs(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Df(t,Ux),{minDaysInFirstWeek:r,startOfWeek:o}=kx(n,this.loc),i=!Gt(n.weekYear)||!Gt(n.weekNumber)||!Gt(n.weekday),a=!Gt(n.ordinal),l=!Gt(n.year),u=!Gt(n.month)||!Gt(n.day),p=l||u,m=n.weekYear||n.weekNumber;if((p||a)&&m)throw new Bl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Bl("Can't mix ordinal dates with month/day");let b;i?b=$x({...Rf(this.c,r,o),...n},r,o):Gt(n.ordinal)?(b={...this.toObject(),...n},Gt(n.day)&&(b.day=Math.min($f(b.year,b.month),b.day))):b=Dx({...Mp(this.c),...n});const[C,_]=cf(b,this.o,this.zone);return gs(this,{ts:C,o:_})}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return gs(this,Vx(this,n))}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t).negate();return gs(this,Vx(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=rn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Mr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Ip}toLocaleString(t=Af,n={}){return this.isValid?Mr.create(this.loc.clone(n),t).formatDateTime(this):Ip}toLocaleParts(t={}){return this.isValid?Mr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let l=jp(this,a);return l+="T",l+=Kx(this,a,n,r,o,i),l}toISODate({format:t="extended"}={}){return this.isValid?jp(this,t==="extended"):null}toISOWeekDate(){return ef(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+Kx(this,a==="extended",n,t,r,i):null}toRFC2822(){return ef(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ef(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?jp(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),ef(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Ip}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=jY(n).map(rn.normalizeUnit),a=t.valueOf()>this.valueOf(),l=a?this:t,u=a?t:this,p=Hq(l,u,i,o);return a?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?Gn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),qx(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?qx(t.base||It.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(It.isDateTime))throw new Kr("min requires all arguments be DateTimes");return Mx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new Kr("max requires all arguments be DateTimes");return Mx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return ZS(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Af}static get DATE_MED(){return rS}static get DATE_MED_WITH_WEEKDAY(){return pY}static get DATE_FULL(){return oS}static get DATE_HUGE(){return iS}static get TIME_SIMPLE(){return aS}static get TIME_WITH_SECONDS(){return sS}static get TIME_WITH_SHORT_OFFSET(){return lS}static get TIME_WITH_LONG_OFFSET(){return cS}static get TIME_24_SIMPLE(){return uS}static get TIME_24_WITH_SECONDS(){return dS}static get TIME_24_WITH_SHORT_OFFSET(){return fS}static get TIME_24_WITH_LONG_OFFSET(){return hS}static get DATETIME_SHORT(){return pS}static get DATETIME_SHORT_WITH_SECONDS(){return gS}static get DATETIME_MED(){return mS}static get DATETIME_MED_WITH_SECONDS(){return yS}static get DATETIME_MED_WITH_WEEKDAY(){return gY}static get DATETIME_FULL(){return vS}static get DATETIME_FULL_WITH_SECONDS(){return bS}static get DATETIME_HUGE(){return _S}static get DATETIME_HUGE_WITH_SECONDS(){return xS}}function _u(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&_s(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new Kr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var fn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(fn||{});function vy(e){const t={1:fn.Monday,2:fn.Tuesday,3:fn.Wednesday,4:fn.Thursday,5:fn.Friday,6:fn.Saturday,7:fn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function bi(e){return{[fn.Monday]:"Monday",[fn.Tuesday]:"Tuesday",[fn.Wednesday]:"Wednesday",[fn.Thursday]:"Thursday",[fn.Friday]:"Friday",[fn.Saturday]:"Saturday",[fn.Sunday]:"Sunday"}[e]}class Jx{constructor(t,n,r){lo(this,"end"),lo(this,"start"),this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[o,i]=n.start.split(":"),[a,l]=n.end.split(":");this.end=this.end.set({hour:Number(a),minute:Number(l)}),this.start=this.start.set({hour:Number(o),minute:Number(i)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class t1{constructor(t,n){lo(this,"holidayHoursByDate"),lo(this,"hours"),lo(this,"timezone"),this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const o=this.getHours(r);if(o&&!o.isClosed)for(const i of o.openIntervals||[]){const a=new Jx(r,i,this.timezone);if(a.contains(t))return a}}return null}getCurrentInterval(){return this.getInterval(It.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(i,a)=>i.start===a.start?0:i.start>a.start?1:-1,o=n.sort(r);for(const[i,a]of o.entries())if(a.contains(t)&&o.length>i+1)return o[i+1];for(const i of o)if(i.start>t)return i;return null}getIntervalsForNDays(t,n){const r=[];for(let o=0;o<t;o++){let i=n;i=i.plus({days:o});const a=this.getHours(i);a&&!a.isClosed&&r.push(...a.openIntervals.map(l=>new Jx(i,l,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=bi(vy(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(It.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,o,i]=n,a=It.fromObject({year:Number(r),month:Number(o),day:Number(i)},{zone:this.timezone});if(t<a)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(It.now())}}function uZ(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function dZ(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function td(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function nd(e){return!e.futureInterval}function fZ(e){return td(e)?an.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):nd(e)?an.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):an.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function hZ(e){return td(e)||nd(e)?null:an.jsx("span",{className:"HoursStatus-separator",children:" • "})}function pZ(e){return td(e)||nd(e)?null:an.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function gZ(e){if(td(e)||nd(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return an.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function mZ(e){var t,n;if(td(e)||nd(e))return null;const r={weekday:"long",...e.dayOptions??{}};let o="";if(e.isOpen){const i=e.currentInterval;o+=((t=i==null?void 0:i.end)==null?void 0:t.setLocale("en-US").toLocaleString(r))||""}else{const i=e.futureInterval;o+=((n=i==null?void 0:i.start)==null?void 0:n.setLocale("en-US").toLocaleString(r))||""}return an.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",o]})}function yZ(e,t){const n=e.currentTemplate||fZ,r=e.separatorTemplate||hZ,o=e.futureTemplate||pZ,i=e.timeTemplate||gZ,a=e.dayOfWeekTemplate||mZ;return an.jsxs("div",{className:Pu("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),o(e),i(e),a(e)]})}const vZ=e=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);H.useEffect(()=>{o(!0)},[]);const i=e.statusTemplate||yZ,a=new t1(e.hours,e.timezone),l=a.isOpenNow(),u=a.getCurrentInterval(),p=a.getNextInterval(),m=(u==null?void 0:u.end)||(p==null?void 0:p.start);if(m&&!t){n(!0);const C=m.toMillis()-It.now().toMillis();setTimeout(()=>n(!1),C)}const b={isOpen:l,currentInterval:u,futureInterval:p,...e};return an.jsx(an.Fragment,{children:r&&i(b,e)})};function bZ(e,t){const n=[];return e.forEach(r=>{const o=n[n.length-1];o?dZ(o.intervals,r.intervals)?(o.endDay=r.endDay,o.isToday=o.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const o=t&&bi(r.startDay)in t?t[bi(r.startDay)]||"":bi(r.startDay),i=t&&bi(r.endDay)in t?t[bi(r.endDay)]||"":bi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${o}`:`${o} - ${i}`}})}function _Z(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(o=>{const i=o.getStartTime("en-US",t),a=o.getEndTime("en-US",t);n.push(`${i} - ${a}`)}),n}function xZ(e,t,n){const r=[];for(let o=1;o<=7;o++){const i=It.fromObject({weekday:o}),a=vy(i);r.push({startDay:a,endDay:a,dayName:n&&bi(a).toLowerCase()in n?n[bi(a).toLowerCase()]||"":bi(a),intervals:e.filter(l=>l.start.weekday===o),isToday:t.weekday===o})}return r}const EZ=e=>{const[t,n]=H.useState(!1);H.useEffect(()=>{n(!0)},[]);const r=new t1(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),o=It.now(),i=r.getIntervalsForNDays(7,o);let a=xZ(i,o,e.dayOfWeekNames);function l(m){return m?{today:vy(o),monday:fn.Monday,tuesday:fn.Tuesday,wednesday:fn.Wednesday,thursday:fn.Thursday,friday:fn.Friday,saturday:fn.Saturday,sunday:fn.Sunday}[m]:fn.Sunday}let u=[fn.Sunday,fn.Monday,fn.Tuesday,fn.Wednesday,fn.Thursday,fn.Friday,fn.Saturday];const p=u.indexOf(l(e.startOfWeek));return u=uZ(u,7-p),a.sort((m,b)=>u.indexOf(m.startDay)-u.indexOf(b.startDay)),e.collapseDays&&(a=bZ(a,e.dayOfWeekNames)),an.jsx(an.Fragment,{children:t&&an.jsx("div",{className:Pu("HoursTable",e.className),children:a.map(m=>{const b=(e.intervalStringsBuilderFn||_Z)(m,e.timeOptions);return an.jsxs("div",{className:Pu("HoursTable-row",{"is-today":m.isToday}),children:[an.jsx("span",{className:"HoursTable-day",children:m.dayName}),an.jsx("span",{className:"HoursTable-intervals",children:b.map((C,_)=>an.jsx("span",{className:"HoursTable-interval",children:C},_))})]},m.dayName)})})})},Og=Math.log2(1.6745627884839434),CZ=4,wZ=19,Ag="js-baidu-neg-lng-fix";let n1;const TZ=new Promise(e=>n1=e),NZ="https://api.map.baidu.com/geoconv/v1/";let xu=[];const SZ="gcj02ToBD09Callback_b872c21c";let OZ=0,Xx;async function r1(e){return await new Promise((t,n)=>{xu.push({coordinates:e,resolve:t,reject:n}),xu.length===1&&(Xx=setTimeout(r,100)),xu.length>40&&(clearTimeout(Xx),r());function r(){const o=xu;xu=[];const i=[].concat(...o.map(u=>u.coordinates)),a=SZ+"_"+OZ++,l=document.createElement("script");window[a]=u=>{if(u.status){const b=new Error(`Unable to convert coordinates to BD-09: Received status code ${u.status}${u.message?": "+u.message:""}`);o.forEach(C=>C.reject(b))}const p=u.result.map(b=>new yc(b.y,b.x));let m=0;o.forEach(b=>{b.resolve(p.slice(m,m+=b.coordinates.length))}),delete window[a],l.parentNode.removeChild(l)},TZ.then(u=>{const p={ak:u,callback:a,coords:i.map(m=>`${m.longitude},${m.latitude}`).join(";"),from:3,to:5};l.src=NZ+"?"+Object.entries(p).map(([m,b])=>m+"="+b).join("&"),document.head.appendChild(l)})}})}class AZ extends vc{constructor(t){super(t);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:n?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new yc(this.map.getCenter())}getZoom(){return this.map.getZoom()-Og}setCenter(t,n){this._centerReady=r1([t]).then(([r])=>{const o=new BMap.Point(r.longitude,r.latitude);this.map.panTo(o,{noAnimation:!n})})}setZoom(t,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+Og)},{enableAnimation:n})})}}class RZ extends sh{constructor(t){super(t),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(a){return n._wrapper=super.initialize(a),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const a=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const o=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(o),this.pin.setShadow(o)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=r1([t]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](Ag)})}setMap(t,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?Ag:""} ${this._wrapperClass}`}}const $Z="https://api.map.baidu.com/getscript";function DZ(e,t,n,{params:r={},version:o="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const i=n,a={ak:i,v:o,...r};n1(i);const l=document.createElement("script");l.src=$Z+"?"+Object.entries(a).map(([m,b])=>m+"="+b).join("&"),l.onload=()=>e(),document.head.appendChild(l);let u="";for(let m=CZ;m<=wZ;m++){const b=2**(m-Og+7);u+=`[data-baidu-zoom="${m}"] .${Ag}{transform:translateX(-${b}px);}`}const p=document.createElement("style");p.appendChild(document.createTextNode(u)),document.head.appendChild(p)}new Ps().withLoadFunction(DZ).withMapClass(AZ).withPinClass(RZ).withProviderName("Baidu").build();let o1;function kZ(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}o1=e}class MZ extends vc{constructor(t){super(t),this.wrapper=t.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new o1(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new yc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new Microsoft.Maps.Location(t.latitude,t.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(t,n){this.map.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class PZ extends sh{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(t){super(t),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,n){n&&n.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}const Qx="BingMapsCallback_593d7d33",IZ="https://www.bing.com/api/maps/mapcontrol";function LZ(e,t,n,{params:r={}}={}){window[Qx]=()=>{kZ(),e()};const o={callback:Qx,key:n,...r};ON(IZ+"?"+Object.entries(o).map(([i,a])=>i+"="+a).join("&"))}new Ps().withLoadFunction(LZ).withMapClass(MZ).withPinClass(PZ).withProviderName("Bing").build();class FZ extends vc{constructor(t){if(super(t),this.map=new mapboxgl.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions}),t.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new yc(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(t,n){this.map[n?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,n,r){const o=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:o,zoom:t-1})}}class jZ extends sh{constructor(t){super(t),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(t){this.pin.setLngLat(new mapboxgl.LngLat(t.longitude,t.latitude))}setMap(t,n){t?this.pin.addTo(t.getProviderMap().map):this.pin.remove()}}function BZ(e,t,n,{version:r="v1.13.0"}={}){const o=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ps().withLoadFunction(BZ).withMapClass(FZ).withPinClass(jZ).withProviderName("Mapbox").build();let i1=class extends vc{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new yc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,t){const n=new L.latLng(e.latitude,e.longitude);this.map.panTo(n,{animate:t})}setZoom(e,t){this.map.setZoom(e,{animate:t})}setZoomCenter(e,t,n){const r=new L.latLng(t.latitude,t.longitude);this.map.setView(r,e,{animate:n})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.tileLayerOptions||{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=this.constructor.apiKey,L.tileLayer(n,r).addTo(this.map)}},WZ=class extends ny{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const t=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,o*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function zZ(e,t,n,{version:r="1.7.1"}={}){const o=`https://unpkg.com/leaflet@${r}/dist/leaflet`;i1.apiKey=n;const i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>e(),document.head.appendChild(i),document.head.appendChild(a)}const a1=new Ps().withLoadFunction(zZ).withMapClass(i1).withPinClass(WZ).withProviderName("Leaflet").build(),HZ=a1.getMapClass(),GZ=a1.getPinClass();class VZ extends HZ{_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class KZ extends GZ{}function UZ(e,t,n,{version:r="v1.3.2"}={}){const o=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ps().withLoadFunction(UZ).withMapClass(VZ).withPinClass(KZ).withProviderName("MapQuest").build();const rd=({label:e,link:t,variant:n,size:r,borderRadius:o,className:i,fontSize:a="default"})=>te.jsx(ih,{asChild:!0,className:i,variant:n,size:r,borderRadius:o,fontSize:a,children:te.jsx(Zu,{href:t??"",children:e})});rd.displayName="CTA";const s1=Tr("components",{variants:{level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color font-heading1-fontFamily",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color font-heading2-fontFamily",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color font-heading3-fontFamily",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color font-heading4-fontFamily",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color font-heading5-fontFamily",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color font-heading6-fontFamily"},fontSize:{default:"",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{default:"",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",color:"primary",weight:"default",transform:"none"}}),Ql=ge.forwardRef(({className:e,level:t=1,color:n,weight:r,transform:o,fontSize:i,...a},l)=>{const u=`h${t}`;return te.jsx(u,{id:"tag",className:xr(s1({fontSize:i,color:n,weight:r,transform:o,level:t}),e),ref:l,...a,children:a.children})});Ql.displayName="Heading";const l1=Tr("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),Ls=ge.forwardRef(({className:e,padding:t,maxWidth:n,...r},o)=>te.jsx("div",{className:"components bg-main",children:te.jsx("div",{className:xr(l1({padding:t,maxWidth:n}),e),ref:o,...r,children:r.children})}));Ls.displayName="Section";const YZ={address:An({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},qZ=({alignment:e,padding:t,address:n,getDirectionsProvider:r})=>{const o=Pr(),i=On(o,n),a=CN(i,void 0,void 0,{provider:r});return te.jsx(Ls,{className:`flex flex-col justify-center components ${e} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:i&&te.jsx("div",{children:te.jsxs(Yr,{displayName:"Address",fieldId:n.constantValueEnabled?"constant value":"address",children:[te.jsx(h9,{address:i,lines:[["line1"],["line2","city","region","postalCode"]]}),a&&te.jsx(Zu,{cta:{link:a,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},ZZ={fields:YZ,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>te.jsx(qZ,{...e})},c1=ge.forwardRef(({text:e,...t},n)=>{const r=Pr();return te.jsx(Yr,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:te.jsx(gc,{ref:n,...t,children:On(r,e)})})});c1.displayName="BodyText";const eE={text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},JZ={label:"Body Text",fields:eE,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},resolveFields:async()=>{const e=await Ns({fontCssVariable:"--fontFamily-body-fontFamily"});return{...eE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>te.jsx(c1,{...e})},XZ="https://placehold.co/640x360",by=Tr("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),QZ={image:An({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},eJ=({image:e,size:t,aspectRatio:n,rounded:r})=>{const o=Pr(),i=On(o,e);return i?te.jsx(Yr,{displayName:"Image",fieldId:e.field,children:te.jsx("div",{className:xr(by({size:t,aspectRatio:n,rounded:r}),"overflow-hidden"),children:te.jsx(ah,{image:i,className:"w-full h-full object-cover"})})}):null},tJ={label:"Image",fields:QZ,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:XZ},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>te.jsx(eJ,{...e})},nJ="https://placehold.co/640x360",rJ={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},heading:{type:"object",label:"Title",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},subheading:{type:"object",label:"Description",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},body:{type:"object",label:"Description",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:An({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:An({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:co()}}},oJ=({orientation:e,heading:t,subheading:n,body:r,image:o,cta:i})=>{const a=Pr(),l=On(a,o.image),u=On(a,i.entityField);return l?te.jsx(Ls,{className:"components",children:te.jsxs("div",{className:xr("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[l&&te.jsx(Yr,{displayName:"Image",fieldId:o.image.field,children:te.jsx("div",{className:xr(by({size:o.size,rounded:o.rounded,aspectRatio:o.aspectRatio}),"overflow-hidden"),children:te.jsx(ah,{image:l,className:"w-full h-full object-cover"})})}),te.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&te.jsx(Ql,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:On(a,t.text)}),(n==null?void 0:n.text)&&te.jsx(Ql,{fontSize:n.fontSize,color:n.color,transform:n.transform,children:On(a,n.text)}),(r==null?void 0:r.text)&&te.jsx(gc,{fontSize:r.fontSize,textTransform:r.transform,color:r.color,children:On(a,r.text)}),u&&te.jsx(rd,{variant:i.variant,label:u.name,link:u.link??"#",fontSize:i.fontSize})]})]})}):null},iJ={label:"Card",fields:rJ,defaultProps:{orientation:"left",heading:{text:{field:"",constantValue:"Heading",constantValueEnabled:!0},fontSize:"3xl",color:"default",transform:"none"},subheading:{text:{field:"",constantValue:"SubHeading",constantValueEnabled:!0},fontSize:"xl",color:"default",transform:"none"},body:{text:{field:"",constantValue:"Body",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:nJ},constantValueEnabled:!0},size:"full",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>te.jsx(oJ,{...e})},aJ={entityField:An({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:co(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},sJ=({entityField:e,variant:t,className:n,fontSize:r,size:o,borderRadius:i})=>{const a=Pr(),l=On(a,e);return te.jsx(Yr,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:te.jsx(rd,{label:l==null?void 0:l.label,link:(l==null?void 0:l.link)||"#",variant:t,className:n,fontSize:r,size:o,borderRadius:i})})},lJ={label:"Call to Action",fields:aJ,defaultProps:{entityField:{field:"",constantValue:{name:"Call to Action"}},variant:"primary",fontSize:"default",borderRadius:"default",size:"default"},render:e=>te.jsx(sJ,{...e})},cJ="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",uJ=Tr("list-inside font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),tE={list:An({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},dJ=({list:e,fontSize:t,fontWeight:n,color:r,includeHyperlink:o,listLength:i})=>{const a=Pr();let l=On(a,e);return l?Array.isArray(l)||(l=[l]):l=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],te.jsx(Yr,{displayName:"Email List",fieldId:e.field,children:te.jsx("ul",{className:xr("components",uJ({fontSize:t,fontWeight:n,color:r}),`${o?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:l.slice(0,Math.min(l.length,i)).map((u,p)=>te.jsxs("li",{className:"mb-2 flex items-center",children:[te.jsx("img",{className:"mr-2",src:cJ}),te.jsx("span",{children:o?te.jsx("a",{href:u,children:u}):u})]},p))})})},fJ={label:"Emails",fields:tE,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},resolveFields:async()=>{const e=await Ns({fontCssVariable:"--fontFamily-body-fontFamily"});return{...tE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>te.jsx(dJ,{...e})},hJ=Tr("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),u1=ge.forwardRef(({className:e,direction:t,alignment:n,justification:r,spacing:o,renderDropZone:i,...a},l)=>te.jsx("div",{className:xr(hJ({direction:t,alignment:n,justification:r,spacing:o}),e),ref:l,...a,children:i({zone:"flex-container"})}));u1.displayName="FlexContainer";const pJ={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},gJ={label:"Flex Container",fields:pJ,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:n,spacing:r,className:o,puck:{renderDropZone:i}})=>te.jsx(u1,{renderDropZone:i,direction:e,alignment:t,justification:n,className:o,spacing:r})},mJ=Tr("",{variants:{backgroundColor:{default:"bg-footer-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),yJ={copyright:{type:"object",label:"Copyright Text",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}}},links:{type:"array",label:"Links",arrayFields:{cta:An({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},vJ={fields:yJ,defaultProps:{copyright:{text:{field:"",constantValue:"Copyright Text",constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Footer Link"},constantValueEnabled:!0}}]},label:"Footer",render:e=>te.jsx(bJ,{...e}),resolveFields:async(e,{fields:t})=>{const n=await Ns({fontCssVariable:"--fontFamily-body-fontFamily"});return{...t,copyright:{...t.copyright,objectFields:{...t.copyright.objectFields,fontWeight:{label:"Font Weight",type:"select",options:n}}}}},resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const n=[],r=o=>{if(!o||n.includes(o)){const i=Rg.v4();return n.push(i),o}return o};return{props:{...e,links:e.links.map(o=>({...o,id:r(o.id)}))}}}},bJ=e=>{const t=Pr(),{links:n,backgroundColor:r,copyright:o}=e,i=n==null?void 0:n.map(l=>{const u=On(t,l.cta);if(u)return{id:l.id,...u}}).filter(l=>l!==void 0),a=On(t,o.text);return te.jsxs("footer",{className:xr("w-full bg-white components",mJ({backgroundColor:r})),children:[te.jsx("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 pt-4 pb-3",children:te.jsx("div",{className:"flex items-center justify-end space-x-4",children:te.jsx("ul",{className:"flex space-x-8",children:i==null?void 0:i.map((l,u)=>te.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:te.jsx(Zu,{cta:l,eventName:`link${u}`})},l.id??u))})})}),te.jsx("div",{className:"mx-auto max-w-6xl px-4 pt-3 pb-4",children:te.jsx(gc,{fontSize:o.fontSize,textTransform:o.textTransform,fontWeight:o.fontWeight,color:o.color,children:a})})]})},_J={coordinate:An({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:co(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},xJ=({variant:e,size:t,borderRadius:n,coordinate:r,getDirectionsProvider:o,fontSize:i})=>{const a=Pr(),l=On(a,r);l||console.warn("yextDisplayCoordinate is not present in the stream");const u=CN(void 0,void 0,void 0,{provider:o},l);return te.jsx(ih,{asChild:!0,variant:e,size:t,fontSize:i,borderRadius:n,children:te.jsx(Zu,{href:u??"#",children:"Get Directions"})})},EJ={fields:_J,defaultProps:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>te.jsx(xJ,{...e})},CJ=[{label:"0",value:"py-0"},{label:"0.5",value:"py-0.5"},{label:"1",value:"py-1"},{label:"1.5",value:"py-1.5"},{label:"2",value:"py-2"},{label:"2.5",value:"py-2.5"},{label:"3",value:"py-3"},{label:"3.5",value:"py-3.5"},{label:"4",value:"py-4"},{label:"5",value:"py-5"},{label:"6",value:"py-6"},{label:"7",value:"py-7"},{label:"8",value:"py-8"},{label:"9",value:"py-9"},{label:"10",value:"py-10"},{label:"11",value:"py-11"},{label:"12",value:"py-12"},{label:"14",value:"py-14"},{label:"16",value:"py-16"},{label:"20",value:"py-20"},{label:"24",value:"py-24"}],wJ=Tr("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),TJ=Tr("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),NJ=Tr("flex flex-col gap-y-grid-verticalSpacing",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"}},defaultVariants:{verticalAlignment:"start"}}),d1=ge.forwardRef(({className:e,distribution:t,columns:n,horizontalSpacing:r,verticalPadding:o,maxContentWidth:i,renderDropZone:a,backgroundColor:l,...u},p)=>te.jsx(Ls,{className:xr(wJ({maxContentWidth:i,backgroundColor:l}),o),padding:"none",children:te.jsx("div",{className:xr(TJ({horizontalSpacing:r}),e),ref:p,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${n.length}, 1fr)`},...u,children:n.map(({span:m,verticalAlignment:b},C)=>te.jsx("div",{className:xr(NJ({verticalAlignment:b})),style:{gridColumn:m&&t==="manual"?`span ${Math.max(Math.min(m,12),1)}`:""},children:a({zone:`column-${C}`})},C))})}));d1.displayName="GridSection";const SJ={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]}}},verticalPadding:{label:"Vertical Padding",type:"select",options:CJ},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},OJ={label:"Grid Section",fields:SJ,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start"},{verticalAlignment:"start"}],verticalPadding:"default",backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i,puck:{renderDropZone:a}})=>te.jsx(d1,{renderDropZone:a,columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i})},AJ="https://placehold.co/50",RJ=Tr("",{variants:{backgroundColor:{default:"bg-header-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),$J={logo:{type:"object",label:"Logo",objectFields:{image:An({label:"Image",filter:{types:["type.image"]}})}},links:{type:"array",label:"Links",arrayFields:{cta:An({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},DJ={fields:$J,defaultProps:{logo:{image:{field:"",constantValue:{height:50,width:50,url:AJ},constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}]},label:"Header",render:e=>te.jsx(kJ,{...e}),resolveData:({props:e},{lastData:t})=>{if((t==null?void 0:t.props.links.length)===e.links.length)return{props:e};const n=[],r=o=>{if(!o||n.includes(o)){const i=Rg.v4();return n.push(i),o}return o};return{props:{...e,links:e.links.map(o=>({...o,id:r(o.id)}))}}}},kJ=e=>{const t=Pr(),{logo:n,links:r,backgroundColor:o}=e,i=On(t,n.image),a=r==null?void 0:r.map(l=>{const u=On(t,l.cta);if(u)return{id:l.id,...u}}).filter(l=>l!==void 0);return te.jsx("header",{className:xr("w-full bg-white components",RJ({backgroundColor:o})),children:te.jsxs("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 py-6",children:[i&&te.jsx(ah,{image:i,className:"w-full h-full object-cover"}),te.jsx("div",{className:"flex items-center justify-end space-x-4",children:te.jsx("ul",{className:"flex space-x-8",children:a==null?void 0:a.map((l,u)=>te.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:te.jsx(Zu,{cta:l,eventName:`link${u}`})},l.id??u))})})]})})},f1=ge.forwardRef(({text:e,...t},n)=>{const r=Pr();return te.jsx(Yr,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:te.jsx(Ql,{ref:n,...t,children:On(r,e)})})});f1.displayName="HeadingText";const nE={text:An({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},MJ={label:"Heading Text",fields:nE,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},resolveFields:async e=>{const t=await Ns({fontCssVariable:`--fontFamily-heading${e.props.level}-fontFamily`});return{...nE,weight:{label:"Font Weight",type:"select",options:t}}},render:e=>te.jsx(f1,{...e})},PJ={hours:An({label:"Hours",filter:{types:["type.hours"]}}),startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},IJ=({hours:e,startOfWeek:t,collapseDays:n,showAdditionalHoursText:r,alignment:o,padding:i})=>{const a=Pr(),l=On(a,e),{additionalHoursText:u}=a;return te.jsx(Ls,{className:`flex flex-col justify-center components ${o} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:i,children:te.jsxs("div",{children:[l&&te.jsx(Yr,{displayName:"Hours",fieldId:"hours",children:te.jsx(EZ,{hours:l,startOfWeek:t,collapseDays:n})}),u&&r&&te.jsx(Yr,{displayName:"Hours Text",fieldId:"additionalHoursText",children:te.jsx("div",{className:"mt-4",children:u})})]})})},LJ={fields:PJ,defaultProps:{hours:{field:"hours",constantValue:{}},startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Table",render:e=>te.jsx(IJ,{...e})},FJ={hours:An({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},jJ=({hours:e,className:t,showCurrentStatus:n,timeFormat:r,showDayNames:o,dayOfWeekFormat:i})=>{const a=Pr(),l=On(a,e);return l?te.jsx(Yr,{displayName:"Hours",fieldId:e.field,children:te.jsx(vZ,{hours:l,className:xr("components font-semibold mb-2 font-body-fontFamily",t),currentTemplate:n?void 0:()=>te.jsx(te.Fragment,{}),separatorTemplate:n?void 0:()=>te.jsx(te.Fragment,{}),dayOfWeekTemplate:o?void 0:()=>te.jsx(te.Fragment,{}),dayOptions:{weekday:i},timeOptions:{hour12:r==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},BJ={label:"Hours Status",fields:FJ,defaultProps:{hours:{field:"hours",constantValue:{}},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>te.jsx(jJ,{...e})},WJ=Tr("components flex gap-2 items-center text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontWeight:"default",color:"default"}}),zJ=(e,t="domestic")=>{const r=(""+e).replace(/\D/g,"").match(/^(?:\+?(\d{1,3}))?(\d{3})(\d{3})(\d{4})$/);if(r){const o=r[1]?`+${r[1]} `:"";return t==="international"?`${o}(${r[2]}) ${r[3]}-${r[4]}`:`(${r[2]}) ${r[3]}-${r[4]}`}return e},rE={phone:An({label:"Entity Field",filter:{types:["type.phone"]}}),format:{label:"Format",type:"radio",options:[{label:"Domestic",value:"domestic"},{label:"International",value:"international"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},HJ=({phone:e,format:t,fontWeight:n,color:r})=>{const o=Pr(),i=On(o,e);if(i)return te.jsx(Yr,{displayName:"Phone",fieldId:e.field,children:te.jsxs("p",{className:WJ({fontWeight:n,color:r}),children:[te.jsx(M$,{className:"w-4 h-4"}),zJ(i,t)]})})},GJ={label:"Phone",fields:rE,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},resolveFields:async()=>{const e=await Ns({fontCssVariable:"--fontFamily-body-fontFamily"});return{...rE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>te.jsx(HJ,{...e})},VJ="https://placehold.co/640x360",KJ={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},title:{type:"object",label:"Title",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},description:{type:"object",label:"Description",objectFields:{text:An({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:co(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:An({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:An({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:co()}}},UJ=({orientation:e,title:t,description:n,image:r,cta:o})=>{const i=Pr(),a=On(i,r.image),l=On(i,o.entityField);return a?te.jsx(Ls,{className:"components",children:te.jsxs("div",{className:xr("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[a&&te.jsx(Yr,{displayName:"Image",fieldId:r.image.field,children:te.jsx("div",{className:xr(by({size:r.size,rounded:r.rounded,aspectRatio:r.aspectRatio}),"overflow-hidden"),children:te.jsx(ah,{image:a,className:"w-full h-full object-cover"})})}),te.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&te.jsx(Ql,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:On(i,t.text)}),(n==null?void 0:n.text)&&te.jsx(gc,{fontSize:n.fontSize,textTransform:n.transform,color:n.color,children:On(i,n.text)}),l&&te.jsx(rd,{variant:o.variant,label:l.name,link:l.link??"#",fontSize:o.fontSize})]})]})}):null},YJ={label:"Promo",fields:KJ,defaultProps:{orientation:"left",title:{text:{field:"",constantValue:"Title",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},description:{text:{field:"",constantValue:"Description",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:VJ},constantValueEnabled:!0},size:"medium",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>te.jsx(UJ,{...e})},qJ=Tr("list-disc components list-inside text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),oE={list:An({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},ZJ=({list:e,padding:t,fontWeight:n,color:r,textTransform:o})=>{const i=Pr();let a=On(i,e);return a?Array.isArray(a)||(a=[a]):a=["Sample text 1","Sample text 2","Sample text 3"],te.jsx(Yr,{displayName:"Text List",fieldId:e.field,children:te.jsx("ul",{className:qJ({padding:t,fontWeight:n,color:r,textTransform:o}),children:a.map((l,u)=>te.jsx("li",{className:"mb-2",children:l},u))})})},JJ={label:"Text List",fields:oE,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},resolveFields:async()=>{const e=await Ns({fontCssVariable:"--fontFamily-body-fontFamily"});return{...oE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>te.jsx(ZJ,{...e})};exports.AddressComponent=ZZ;exports.Body=gc;exports.BodyTextComponent=JZ;exports.Button=ih;exports.CTA=rd;exports.CTAWrapperComponent=lJ;exports.CardComponent=iJ;exports.DocumentContext=$g;exports.Editor=fU;exports.EmailsComponent=fJ;exports.EntityField=Yr;exports.FlexContainerComponent=gJ;exports.FontSizeSelector=co;exports.Footer=vJ;exports.GetDirectionsComponent=EJ;exports.GridSectionComponent=OJ;exports.Header=DJ;exports.Heading=Ql;exports.HeadingTextComponent=MJ;exports.HoursStatusComponent=BJ;exports.HoursTableComponent=LJ;exports.ImageWrapperComponent=tJ;exports.Jl=Pu;exports.NumberFieldWithDefaultOption=t9;exports.PhoneComponent=GJ;exports.PromoComponent=YJ;exports.Section=Ls;exports.TailwindConfigContext=Dg;exports.TextListComponent=JJ;exports.VisualEditorProvider=HO;exports.YextEntityFieldSelector=An;exports.Zl=wN;exports.applyTheme=rO;exports.bodyVariants=xN;exports.buttonVariants=EN;exports.constructFontSelectOptions=Q1;exports.defaultFonts=kg;exports.getFontWeightOptions=nO;exports.getFontWeightOverrideOptions=Ns;exports.headingVariants=s1;exports.lt=an;exports.resolveYextEntityField=On;exports.sectionVariants=l1;exports.themeMangerCn=xr;exports.themeMangerTwMergeConfiguration=wE;exports.themeResolver=iO;exports.useDocument=Pr;exports.useEntityFields=dE;exports.usePlatformBridgeDocument=Y1;exports.usePlatformBridgeEntityFields=q1;exports.useTailwindConfig=fE;